Package: alexandria

Function map-product

Lambda List

map-product (function list &rest more-lists)

Details

Returns a list containing the results of calling function with one argument from list, and one from each of more-lists for each combination of arguments. In other words, returns the product of list and more-lists using function.

Examples

(map-product 'list '(1 2) '(3 4) '(5 6))
 => ((1 3 5) (1 3 6) (1 4 5) (1 4 6)
     (2 3 5) (2 3 6) (2 4 5) (2 4 6))