Handbook
Glossary
2lazy-list ( a b -- lazy-cons )
Lazy lists
ยป
Constructing lazy lists
Prev:
1lazy-list ( a -- lazy-cons )
Next:
3lazy-list ( a b c -- lazy-cons )
Vocabulary
lists
.
lazy
Inputs
a
a
quotation
with stack effect
( -- X )
b
a
quotation
with stack effect
( -- X )
Outputs
lazy-cons
a lazy-cons object
Word description
Create a lazy list with 2 elements. The elements are the result of calling the quotations. The quotations are only called when the list elements are requested.
See also
1lazy-list
,
3lazy-list
Definition
USING:
quotations
;
IN:
lists.lazy
:
2lazy-list
( a b -- lazy-cons )
1lazy-list
1quotation
lazy-cons
;