Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
More general versions of some functions from Hextra.Tuple
Synopsis
- bothmap :: forall g a b. Bifunctor g => (a -> b) -> g a a -> g b b
- bothmap' :: forall g b x y. Bifunctor g => (forall a. a -> b) -> g x y -> g b b
- bothmapC :: forall g b (f :: Type -> Constraint) x y. (f x, f y, Bifunctor g) => (forall a. f a => a -> b) -> g x y -> g b b
- bothmapB :: forall g (f :: Type -> Type -> Constraint) x y z w. (f x z, f y w, Bifunctor g) => (forall a b. f a b => a -> b) -> g x y -> g z w
Documentation
bothmap :: forall g a b. Bifunctor g => (a -> b) -> g a a -> g b b Source #
Maps a function onto a homogenous bifunctor (like tuples). homogenous = same type in both slots
bothmap' :: forall g b x y. Bifunctor g => (forall a. a -> b) -> g x y -> g b b Source #
Maps a universally polymorphic over any (even heterogenous) bifunctor. universally polymorphic = works for any type