A Haskell Functor is a type F :: * -> *
which belong to the type class Functor
; thus instantiate
fmap :: (a -> b) -> (F a -> F b)
.
F
: \(\ob{\Hask}→\ob{\Hask}\)
& fmap
: \(\hom{\Hask}→\hom{\Hask}\)
The couple (F,fmap)
is a \(\Hask\)'s functor if for any x :: F a
:
fmap id x = x
fmap (f.g) x= (fmap f . fmap g) x