Name

range

Usage

builtin-function

Syntax

(range start end step)
(range start end)
(range end)
(range)

Description

Returns a lazy list of integer numbers. By default, a range starts at 0 and excludes its upper bound.

user > (range 3 10 2)
it: (3 5 7 9)
user > (range 3 10)
it: (3 4 5 6 7 8 9)
user > (range 10)
it: (0 1 2 3 4 5 6 7 8 9)
user > (range 10 3 -1)
it: (10 9 8 7 6 5 4)