<memoized-cons> ( cons -- memoized-cons )
Lazy lists ยป Manipulating lazy lists

Next:lappend-lazy ( list1 list2 -- result )


Vocabulary
lists.lazy

Inputs
consa cons object


Outputs
memoized-consthe resulting memoized-cons object


Word description
Constructs a cons object that wraps an existing cons object. Requests for the car, cdr and nil? will be remembered after the first call, and the previous result returned on subsequent calls.

See also
cons, car, cdr, nil, nil?

Definition