list
Create a list with specific items
219 bytes
Usage
Given a start, end, value, and step size returns a list with values from start to end by step size.
The interface is identical to range
.
A hat tip to Python’s range
functionality
Signatures
list(size)
When givin a single argument, it’s treated as the size
. Returns a list with values from 0 to size
.
list(start, end)
When given two arguments, they’re treated as the start
and end
. Returns a list with values from start
to end
list(start, end, value)
When given a third argument it’s treated as the value
to be used in the list. If the value
is a function it will be called, with an index argument, to create every value.
list(start, end, value, step)
When given a fourth argument it’s treated as the step
size to skip when generating values from start
to end
.