module Utils.EnumerateMaps
(
enumMaps
)
where
import Utils.CartesianProduct
import Utils.AssociationList
enumMaps :: [a]
-> [b]
-> [AssociationList a b]
enumMaps :: forall a b. [a] -> [b] -> [AssociationList a b]
enumMaps [a]
dom [b]
codom = [a] -> [b] -> [(a, b)]
forall a b. [a] -> [b] -> [(a, b)]
zip [a]
dom ([b] -> [(a, b)]) -> [[b]] -> [[(a, b)]]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [b]
codom [b] -> Int -> [[b]]
forall {a}. [a] -> Int -> [[a]]
|^| ([a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [a]
dom)