compositions and nested types

help.q mentions a non-scalar type called “composition” with an id of105. What is a composition and how is one created? I assume it hassomething to do with composing functions.Also what’s a “nested type”? The text says an object with a type id of78 is a nested boolean. I understand that type -1 is a boolean scalar,and 1 is a vector of boolean values, but I’m not sure what a nestedboolean would be. Can someone explain?

composition
q)type (2+3-)
105h

nested type for col b
q):t/ set ([]a:1 2 3;b:(1 1 1;2 2 2;3 3 3)) :t/
q)type get:t/a 6h q)type get:t/b
83h

On Jan 13, 9:56?pm, Charles Skelton <char…> wrote:> q)type (2+3-)> 105hSince 3- is a projection, it looks like you get a composition byapplying an atomic function to a projection. Do projections andcompositions work together to form closures in q?(2+3-) 10-5But my head just exploded trying to figure out why the parens arenecessary. It seems like the usual “left of right” evaluation shouldwork without ()‘s, but the results are unexpected. Using your originalexample:q)type 2+3-@+[2]-[3]Digging deeper:q)parse “type (2+3-)”@:(’;(+;2);(-;3))What’s that single quote doing there? Each-both?q)parse “type 2+3-”‘@:(’;(+;2);(-;3))Boom. Brain matter all over my keyboard.</char…>