The implementation covers an optional third element in the argument/quotation which may function as a step.
Also, it supports range regardless of the direction: if a<b it generates an upwards range, while if a>=b it generates a downwards range.
Here's the relevant part from the unit tests:
((1 5) range (1 2 3 4 5) ==) assert
((5 1) range (5 4 3 2 1) ==) assert
((4 7) range (4 5 6 7) ==) assert
((7 4) range (7 6 5 4) ==) assert
((1 6 2) range (1 3 5) ==) assert
((1 6 3) range (1 4) ==) assert
((0 6 2) range (0 2 4 6) ==) assert
((6 1 2) range (6 4 2) ==) assert
((6 1 3) range (6 3) ==) assert
((6 0 2) range (6 4 2 0) ==) assert
Exactly as we said :) #108
The implementation covers an optional third element in the argument/quotation which may function as a
step
. Also, it supports range regardless of the direction: ifa<b
it generates an upwards range, while ifa>=b
it generates a downwards range.Here's the relevant part from the unit tests: