I’m trying to implement Conway’s game of life in the Q programming language and i’m using the trial version. Generating the first version of the matrix is easy, but then the algorithm i’m following requires shifting the matrix up, down left and right. This works -“1 rotate a”, and this also works “1 rotate a” and also works fine when combining them with -1 1 rotate : a. When i try to rotate to left and right i first tried 1 rotate /: a and all i got was rotate’s definition from q.k . Since 1 rotate a[0] works i can’t figure why applying /: does not , seeing how it’s supposed to apply the diadic function rotate to each element of a. a is defined like this in case you were wondering : a: 4 4#16?2.
Thanks in advance, and glad to be part of this community. K looks like a really cool language, even if it’s wrapped in q