3lazy-list ( a b c -- lazy-cons ) (original) (raw)

3lazy-list ( a b c -- lazy-cons )
Lazy lists » Constructing lazy lists

Prev: 2lazy-list ( a b -- lazy-cons )
Next: sequence-tail>list ( index seq -- list )

Vocabulary
lists.lazy

Inputs

a a quotation with stack effect ( -- X )
b a quotation with stack effect ( -- X )
c a quotation with stack effect ( -- X )

Outputs

lazy-cons a lazy-cons object

Word description
Create a lazy list with 3 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, 2lazy-list

Definition

USING: quotations ;

IN: lists.lazy

: 3lazy-list ( a b c -- lazy-cons )
2lazy-list 1quotation lazy-cons ;