lcartesian-map* ( list guards quot: ( elt1 elt2 -- newelt ) -- result )
Lazy lists ยป Combinators for manipulating lazy lists

Prev:lcartesian-map ( list quot: ( elt1 elt2 -- newelt ) -- result )


Vocabulary
lists.lazy

Inputs
lista list of lists
guardsa sequence of quotations with stack effect ( elt1 elt2 -- ? )
quota quotation with stack effect ( elt1 elt2 -- newelt )


Outputs
resulta list


Word description
Get the cartesian product of the lists in list, filter it by applying each guard quotation to it and call quot call with each element from the remaining cartesian product items on the stack, the result of which is returned in the final list.

Examples
USING: kernel lists lists.lazy math prettyprint ; { 1 2 3 } >list { 4 5 6 } >list 2list { [ drop odd? ] } [ + ] lcartesian-map* list>array .
{ 5 6 7 7 8 9 }


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

Definition