Hoogle Search
Within LTS Haskell 24.35 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
ixmap :: (IArray a e, Ix i, Ix j) => (i, i) -> (i -> j) -> a j e -> a i earray Data.Array.IArray Returns a new array derived from the original array by applying a function to each of the indices.
gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> asemigroups Data.Semigroup.Generic Generically generate a Semigroup (<>) operation for any type implementing Generic. This operation will append two values by point-wise appending their component fields. It is only defined for product types.
gmappend a (gmappend b c) = gmappend (gmappend a b) c
imapPrimArray :: (Prim a, Prim b) => (Int -> a -> b) -> PrimArray a -> PrimArray bprimitive Data.Primitive.PrimArray Indexed map over the elements of a primitive array.
bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b dlens Control.Lens.Combinators Map over both arguments at the same time.
bimap f g ≡ first f . second g
Examples
>>> bimap toUpper (+1) ('j', 3) ('J',4)>>> bimap toUpper (+1) (Left 'j') Left 'J'
>>> bimap toUpper (+1) (Right 3) Right 4
-
lens Control.Lens.Combinators Lift two Isos into both arguments of a Bifunctor.
bimapping :: Bifunctor p => Iso s t a b -> Iso s' t' a' b' -> Iso (p s s') (p t t') (p a a') (p b b') bimapping :: Bifunctor p => Iso' s a -> Iso' s' a' -> Iso' (p s s') (p a a')
concatMapOf :: Getting [r] s a -> (a -> [r]) -> s -> [r]lens Control.Lens.Combinators Map a function over all the targets of a Fold of a container and concatenate the resulting lists.
>>> concatMapOf both (\x -> [x, x + 1]) (1,3) [1,2,3,4]
concatMap ≡ concatMapOf folded
concatMapOf :: Getter s a -> (a -> [r]) -> s -> [r] concatMapOf :: Fold s a -> (a -> [r]) -> s -> [r] concatMapOf :: Lens' s a -> (a -> [r]) -> s -> [r] concatMapOf :: Iso' s a -> (a -> [r]) -> s -> [r] concatMapOf :: Traversal' s a -> (a -> [r]) -> s -> [r]
contramap :: Contravariant f => (a' -> a) -> f a -> f a'lens Control.Lens.Combinators No documentation available.
contramapped :: forall (f :: Type -> Type) b a . Contravariant f => Setter (f b) (f a) a blens Control.Lens.Combinators This Setter can be used to map over all of the inputs to a Contravariant.
contramap ≡ over contramapped
>>> getPredicate (over contramapped (*2) (Predicate even)) 5 True
>>> getOp (over contramapped (*5) (Op show)) 100 "500"
>>> Prelude.map ($ 1) $ over (mapped . _Unwrapping' Op . contramapped) (*12) [(*2),(+1),(^3)] [24,13,1728]
-
lens Control.Lens.Combinators Lift an Iso into a Contravariant functor.
contramapping :: Contravariant f => Iso s t a b -> Iso (f a) (f b) (f s) (f t) contramapping :: Contravariant f => Iso' s a -> Iso' (f a) (f s)
dimap :: Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a dlens Control.Lens.Combinators Map over both arguments at the same time.
dimap f g ≡ lmap f . rmap g