range generates numeric sequences for use with sequence-processing operations. Its arities support an infinite sequence, an end value, or explicit start, end, and step values. section 3.4.2
Use these rules to predict the result:
- With no arguments, produces numbers from 0 toward positive infinity. section 3.4.2
- With end, starts at 0 and stops before end; start defaults to 0 and step to 1. section 3.4.2
- With three arguments, supports increasing or decreasing sequences; incompatible bounds produce an empty sequence. section 3.4.2
- Accepts arbitrary-precision numeric values and throws ArityException for more than three arguments. section 3.4.2
Common ranges
(range 10) ;; (0 1 2 3 4 5 6 7 8 9) (range 0 20 2) ;; (0 2 4 6 8 10 12 14 16 18) (range -1 -20 -2) ;; (-1 -3 -5 -7 -9 -11 -13 -15 -17 -19)







