Reputation: 19486
Say I want to get:
0 0 0 1 0 2 1 0 1 1 1 2 etc
I'm to do (til 3) (,\:) til 3 but this doesn't seem to do it, giving me a type error.
(til 3) (,\:) til 3
What am I doing wrong?
Upvotes: 1
Views: 310
Reputation: 579
cross keyword is what you are looking for
q)(til 3) cross til 3 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2
The solution to your original problem without using a keyword is:
q)raze ((til 3),/:\:) til 3 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2
Upvotes: 4