universum-1.6.1: Custom prelude used in Serokell
Universum.Functor.Fmap
Description
This module contains useful functions to work with Functor type class.
Functor
map :: Functor f => (a -> b) -> f a -> f b Source #
map generalized to Functor.
map
>>> map not (Just True) Just False >>> map not [True,False,True,True] [False,True,False,False]
>>>
map not (Just True)
map not [True,False,True,True]
(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) infixl 4 Source #
Alias for fmap . fmap. Convenient to work with two nested Functors.
fmap . fmap
>>> negate <<$>> Just [1,2,3] Just [-1,-2,-3]
negate <<$>> Just [1,2,3]