Open klequis opened 2 years ago
In mathematics/category theory, a functor is a mapping between categories.
The set must have an identity and be composable.
for every object X in C (identity morphisms).
for all morphisms f:X -> Y and g:Y -> Z in C (composition)
source: wikipedia
unknown source
Rules of functor
Haskell's
Functor
class implements the functor laws.These laws ensure that the containers shape is unchanged by
fmap
and that the container's contents are not re-arranged by the mapping operation.source: https://www.haskell.org/tutorial/monads.html