nl_tokens: calculate direction at each iteration
pl_tokens: function directionSequence ( i , <mask> ) { // :: Int -> Int -> Int if ( i == 0 ) return 0 if ( i % 2 == 0 ) return bitwise . trailingSetBits ( i - 1 ) % dim return bitwise . trailingSetBits ( i ) % dim }