Rotate_mod - kevinlawler/kona GitHub Wiki
a!b - mod/rotate
When the left argument is an atom (single value) and the right argument is a list, !
is rotate:
2! 1 2 3 4 5 6 7 / positive: rotate left 3 4 5 6 7 1 2 -2! 1 2 3 4 5 6 7 / negative: rotate right 6 7 1 2 3 4 5
Otherwise, !
is modulus:
1 2 3 4 5!3 / n mod 3 1 2 0 1 2 9!2 1