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.
cartesianProduct :: Set a -> Set b -> Set (a, b)containers Data.Set.Internal Calculate the Cartesian product of two sets.
cartesianProduct xs ys = fromList $ liftA2 (,) (toList xs) (toList ys)
Example:cartesianProduct (fromList [1,2]) (fromList ['a','b']) = fromList [(1,'a'), (1,'b'), (2,'a'), (2,'b')]
lensProduct :: ALens' s a -> ALens' s b -> Lens' s (a, b)lens Control.Lens.Unsound A lens product. There is no law-abiding way to do this in general. Result is only a valid Lens if the input lenses project disjoint parts of the structure s. Otherwise "you get what you put in" law
view l (set l v s) ≡ v
is violated by>>> let badLens :: Lens' (Int, Char) (Int, Int); badLens = lensProduct _1 _1 >>> view badLens (set badLens (1,2) (3,'x')) (2,2)
but we should get (1,2). Are you looking for alongside?class
GServantProduct (f :: k -> Type)gogol-core Gogol.Prelude No documentation available.
-
base-compat Data.Monoid.Compat No documentation available.
-
base-compat Data.Semigroup.Compat No documentation available.
outerProduct :: (Functor f, Functor g) => (a -> b -> c) -> f a -> g b -> f (g c)utility-ht Control.Functor.HT Generalization of outerProduct.
outerProduct :: (a -> b -> c) -> [a] -> [b] -> [[c]]utility-ht Data.List.HT Operate on each combination of elements of the first and the second list. In contrast to the list instance of liftM2 it holds the results in a list of lists.
\xs ys -> let f x y = (x::Char,y::Int) in concat (outerProduct f xs ys) == liftM2 f xs ys
class
GServantProduct (f :: k -> Type)servant Servant.API No documentation available.
class
GServantProduct (f :: k -> Type)servant Servant.API.Generic No documentation available.
splitDataProductType_maybe :: Type -> Maybe (TyCon, [Type], DataCon, [Scaled Type])ghc GHC.Core.DataCon Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type. Precisely, we return Just for any data type that is all of:
- Concrete (i.e. constructors visible)
- Single-constructor
- ... which has no existentials