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