Handbook
Glossary
<iota> ( n -- iota )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Counted loops
Vocabulary
sequences
Inputs
n
an
integer
Outputs
iota
an
iota
Word description
Creates an immutable virtual sequence containing the integers from 0 to
n-1
.
Examples
USING: math sequences prettyprint ; 3 <iota> [ sq ] map .
{ 0 1 4 }
Definition
USING:
kernel
math
;
IN:
sequences
:
<iota>
( n -- iota )
assert-non-negative
iota
boa
;
inline