lappend-lazy ( list1 list2 -- result )
Lazy lists ยป Manipulating lazy lists

Prev:<memoized-cons> ( cons -- memoized-cons )
Next:lconcat ( list -- result )


Vocabulary
lists.lazy

Inputs
list1a cons object
list2a cons object


Outputs
resulta lazy list of list2 appended to list1


Word description
Perform a similar functionality to that of the append word, but in a lazy manner. No evaluation of the list elements occurs initially but a lazy-append object is returned which conforms to the list protocol. Calling car, cdr or nil? on this will evaluate elements as required. Successive calls to cdr will iterate through list1, followed by list2.

See also
leach, foldl, lmap-lazy, ltake, lfilter, lfrom, lfrom-by, lconcat, lcartesian-product, lcartesian-product*, lcartesian-map, lcartesian-map*, lmerge, lwhile, luntil

Definition