Skip to content

2020-5: Stepping in the Proper Direction

Write a function that, given a right argument of 2 integers, returns a vector of the integers from the first element of the right argument to the second, inclusively.

💡 Hint: The Index Generator function ⍳Y function could be useful when solving this problem.

Examples:

      (your_function) 3 10
3 4 5 6 7 8 9 10

      (your_function) 4 ¯3
4 3 2 1 0 ¯1 ¯2 ¯3

      ⎕←r←(your_function) 42 42
42

      ⍴r   ⍝ this is also a vector
1
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub