functors-0.1: (.:) and friends, syntax for Functor and Applicative.

Data.Functor.Syntax

Synopsis

Documentation

(.) :: Functor f => (a -> b) -> f a -> f bSource

Generalised version of . that is equivalent to fmap, but with the fixity of standard ..

infixr 9 .

unary :: Functor f => (a -> b) -> f a -> f bSource

Alias for fmap.

(.:) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)Source

Nested fmap for Functors inside Functors (two levels).

infixr 9 .:

binary :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)Source

Alias for .:.

(.::) :: (Functor f, Functor g, Functor h) => (a -> b) -> f (g (h a)) -> f (g (h b))Source

Nested fmap for Functors inside Functors inside Functors (three levels).

infixr 9 .::

trinary :: (Functor f, Functor g, Functor h) => (a -> b) -> f (g (h a)) -> f (g (h b))Source

Alias for .::.

flip :: Functor f => f (a -> b) -> a -> f bSource

Generalised version of flip.

(&) :: Applicative f => f (a -> b) -> f a -> f bSource

Alternative syntax for <*> that fits better with the one-letter . from this module.

infixl 4 &