FiniteCategories-0.1.0.0: Finite categories and usual categorical constructions on them.
CopyrightGuillaume Sabbagh 2021
LicenseGPL-3
Maintainerguillaumesabbagh@protonmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Utils.CartesianProduct

Description

Simple functions to compute cartesian products of finite lists.

Synopsis

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] -> [a] -> [[a]] Source #

Returns the cartesian product of two lists

(|^|) :: [a] -> Int -> [[a]] Source #

Infix alias for cartesianPower