Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
productTypeFrom :: forall a (xs :: [Type]) . IsProductType a xs => a -> NP I xsgenerics-sop Generics.SOP.Universe Convert from a product type to its product representation.
productTypeTo :: forall a (xs :: [Type]) . IsProductType a xs => NP I xs -> agenerics-sop Generics.SOP.Universe Convert a product representation to the original type.
productOf :: Num a => Getting (Endo (Endo a)) s a -> s -> adiagrams-lib Diagrams.Prelude Calculate the Product of every number targeted by a Fold.
>>> productOf both (4,5) 20 >>> productOf folded [1,2,3,4,5] 120
product ≡ productOf folded
This operation may be more strict than you would expect. If you want a lazier version use ala Product . foldMapOfproductOf :: Num a => Getter s a -> s -> a productOf :: Num a => Fold s a -> s -> a productOf :: Num a => Lens' s a -> s -> a productOf :: Num a => Iso' s a -> s -> a productOf :: Num a => Traversal' s a -> s -> a productOf :: Num a => Prism' s a -> s -> a
product3With :: (a -> b -> c -> d) -> [[a]] -> [[b]] -> [[c]] -> [[d]]leancheck Test.LeanCheck Like productWith, but over 3 lists of tiers.
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.