Functor protocol
Functors are mappings or homomorphisms between categories –Wikipedia
Functors always take one parameter. They also preserve identity and
composition (see Functor.Law
).
Summary↑
fmap(value, fun) | Takes a function and a functor and returns a functor |
Types ↑
t :: term
Functions
Specs:
Takes a function and a functor and returns a functor.
In Haskell types: fmap :: (a -> b) -> f a -> f b