Copyright | Guillaume Sabbagh 2021 |
---|---|
License | GPL-3 |
Maintainer | guillaumesabbagh@protonmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Simple functions to compute cartesian products of finite lists.
Synopsis
- cartesianProduct :: [[a]] -> [[a]]
- cartesianPower :: [a] -> Int -> [[a]]
- (|*|) :: [a] -> [a] -> [[a]]
- (|^|) :: [a] -> Int -> [[a]]
Documentation
cartesianProduct :: [[a]] -> [[a]] Source #
Returns the cartesian product of the finite lists.
cartesianProduct [A,B,C,...] = A x B x C x ...
cartesianPower :: [a] -> Int -> [[a]] Source #
Returns the cartesian product of a list by itself k times.
(|^|) :: [a] -> Int -> [[a]] Source #
Infix alias for cartesianPower