Vocabulary
lists.lazy

Inputs
lista cons object
quota quotation with stack effect ( elt -- ? )


Outputs
resultresulting cons object


Word description
Outputs a lazy list containing the first items in the list until after quot evaluates to t. No evaluation of the list elements occurs initially but a lazy-while object is returned with conforms to the list protocol. Calling car, cdr or nil? on this will evaluate elements as required.

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

Definition


: luntil ( list quot: ( elt -- ? ) -- result )
over nil? [ drop ] [ <lazy-until> ] if ;