A uniform transformation
(a -> b) over a parameterized type
f, which is also called mapping.
A parameterized type is basically everything, from Lists and Strings to functions itselves.
To be a Functor is to implement the
fmap function which applies a function.
class Functor f where fmap :: (a -> b) -> f a -> f b
"Lifted" application, analogous to
(<$>) :: Functor f => (a -> b) -> f a -> f b (<$>) = fmap
An infix synonym of
substituting a constant instead of function application (transformation)
(<$) :: a -> f b -> f a (<$) = fmap . const