Functor protocol

Functors are mappings or homomorphisms between categories –Wikipedia

Functors always take one parameter. They also preserve identity and composition (see Functor.Law).

Source

Summary

fmap(value, fun)

Takes a function and a functor and returns a functor

Types

t :: term

Functions

fmap(value, fun)

Specs:

  • fmap(t, (term -> term)) :: t

Takes a function and a functor and returns a functor.

In Haskell types: fmap :: (a -> b) -> f a -> f b

Source