emgm-0.1: Extensible and Modular Generics for the MassesSource codeContentsIndex
Generics.EMGM.Functions.Map
Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Description

Summary: Generic function that applies a (non-generic) function to all elements contained in a polymorphic datatype.

map is a generic version of the Prelude map function. It works on all supported container datatypes of kind * -> *. The map function is equivalent to fmap after deriving Functor if that were possible.

Synopsis
newtype Map a b = Map {
selMap :: a -> b
}
map :: FRep2 Map f => (a -> b) -> f a -> f b
replace :: FRep2 Map f => f a -> b -> f b
Documentation
newtype Map a b Source
Type for map
Constructors
Map
selMap :: a -> b
show/hide Instances
map :: FRep2 Map f => (a -> b) -> f a -> f bSource
Apply a function to all elements of a container datatype (kind * -> *).
replace :: FRep2 Map f => f a -> b -> f bSource
Replace all a-values in as with b.
Produced by Haddock version 2.4.2