We should use square brackets when flattering all levels in list:
q)b:(1 2;(3 4;5 6);7;8)
q)raze/[b] / flatten all levels
1 2 3 4 5 6 7 8
q)raze/b
'/
[0] raze/b
But why one forced to use raze/[b]
for Converge syntax instead of simple raze/b
?
- Upd
Why this syntax works in k
, for example {x+y}/1 2 3
but doesn't work in q
?
My assumption that it's been made to prevent qbies errors when using /
adverb instead of %
. I think there may be a discussion about it in some dev channel, but I've found only Shakti discussion group for now at https://groups.google.com/forum/#!forum/shaktidb, and kx.com also shutted down community wiki, so I don't know where to find an additional info - asking here
- Upd2
The /
is quite overloaded in k
too: see (not official ref though) https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Manual.md#over - over
, fixedpoint
, for
and while
. Pretty the same as in q
, right? But why the interpreter 'ban' the k
syntax in q
context, - is there a technical reason why q
can't recognise a user intention as it k
does?