Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
productMaybeWith :: (a -> b -> Maybe c) -> [[a]] -> [[b]] -> [[c]]leancheck Test.LeanCheck Take the product of lists of tiers by a function returning a Maybe value discarding Nothing values.
productWith :: (a -> b -> c) -> [[a]] -> [[b]] -> [[c]]leancheck Test.LeanCheck Take a tiered product of lists of tiers. productWith can be defined by ><, as:
productWith f xss yss = map (uncurry f) $ xss >< yss
(cf. ><)products :: [[[a]]] -> [[[a]]]leancheck Test.LeanCheck Takes the product of N lists of tiers, producing lists of length N. Alternatively, takes as argument a list of lists of tiers of elements; returns lists combining elements of each list of tiers.
products [xss] = mapT (:[]) xss products [xss,yss] = mapT (\(x,y) -> [x,y]) (xss >< yss) products [xss,yss,zss] = product3With (\x y z -> [x,y,z]) xss yss zss
productWith :: (a -> b -> c) -> [[a]] -> [[b]] -> [[c]]leancheck Test.LeanCheck.Core Take a tiered product of lists of tiers. productWith can be defined by ><, as:
productWith f xss yss = map (uncurry f) $ xss >< yss
(cf. ><)product3With :: (a -> b -> c -> d) -> [[a]] -> [[b]] -> [[c]] -> [[d]]leancheck Test.LeanCheck.Error Like productWith, but over 3 lists of tiers.
productMaybeWith :: (a -> b -> Maybe c) -> [[a]] -> [[b]] -> [[c]]leancheck Test.LeanCheck.Error Take the product of lists of tiers by a function returning a Maybe value discarding Nothing values.
productWith :: (a -> b -> c) -> [[a]] -> [[b]] -> [[c]]leancheck Test.LeanCheck.Error Take a tiered product of lists of tiers. productWith can be defined by ><, as:
productWith f xss yss = map (uncurry f) $ xss >< yss
(cf. ><)products :: [[[a]]] -> [[[a]]]leancheck Test.LeanCheck.Error Takes the product of N lists of tiers, producing lists of length N. Alternatively, takes as argument a list of lists of tiers of elements; returns lists combining elements of each list of tiers.
products [xss] = mapT (:[]) xss products [xss,yss] = mapT (\(x,y) -> [x,y]) (xss >< yss) products [xss,yss,zss] = product3With (\x y z -> [x,y,z]) xss yss zss
product3 :: [[a]] -> [[b]] -> [[c]] -> [[(a, b, c)]]leancheck Test.LeanCheck.Tiers Like ><, but over 3 lists of tiers.
product3With :: (a -> b -> c -> d) -> [[a]] -> [[b]] -> [[c]] -> [[d]]leancheck Test.LeanCheck.Tiers Like productWith, but over 3 lists of tiers.