Cartesian product of two or more lists: Difference between revisions
Content added Content deleted
(→Functional JS: Updated applicative version) |
m (→Functional JS) |
||
Line 1,092:
For the Cartesian product of just two lists:
<lang JavaScript>(() => {
// CARTESIAN PRODUCT OF TWO LISTS
// cartProd :: [a] -> [b] -> [[a, b]]
Line 1,099:
// TEST
return [
cartProd([1, 2])([3, 4]),
|