q)square : ((::;2;3);4 5 6;7 8 9)
q)square
:: 2 3
4 5 6
7 8 9
q)square[;0]
::
4
7
q)type square[;0]
0h
q)square[;0] : (10 20 30;40 50 60;70 80 90)
'type
q)square
10 20 30 2 3
4 5 6
7 8 9
q)square : ((::;2;3);4 5 6;7 8 9)
q)square
:: 2 3
4 5 6
7 8 9
q)square[;0]
::
4
7
q)type square[;0]
0h
q)square[;0] : (10 20 30;40 50 60;70 80 90)
'type
q)square
10 20 30 2 3
4 5 6
7 8 9
yes, it’s a bug in the sense that the operation is not atomic, so the result is partially updated.
There’s a couple of oddities like this that are burdensome to correct.