Anonymous user
Cartesian product of two or more lists: Difference between revisions
Cartesian product of two or more lists (view source)
Revision as of 18:17, 21 August 2023
, 9 months ago→{{header|Maxima}}
imported>Maxima enthusiast |
imported>Maxima enthusiast |
||
Line 3,296:
my_cartesian(lst1,lst2):=create_list([i,j],i,lst1,j,lst2);
n_ary_cartesian(singleargument):=block(lreduce(my_cartesian,singleargument),map(flatten,%%));
[[1776,1789],[7,12],[4,14,23],[0,1]]$
n_ary_cartesian(%);
|