------------------------------------------------------------------------------------- -- | -- Copyright : (c) Hans Hoglund 2012 -- -- License : BSD-style -- -- Maintainer : hans@hanshoglund.se -- Stability : stable -- Portability : portable -- -- Provides the revese apply operator. -- -- The definitions of '&' and '<&>' are identical to those in the -- package. Hopefully they could -- move into -- at some point. -- ------------------------------------------------------------------------------------- module Control.Apply.Reverse ( -- ** Reverse ($) (&), (&!), -- ** Reverse (\<$\>) (<&>), ) where import Control.Applicative infixl 1 & infixl 1 &! (&) :: a -> (a -> b) -> b (&) = flip ($) (&!) :: a -> (a -> b) -> b (&!) = flip ($!) infixl 1 <&> (<&>) :: Functor f => f a -> (a -> b) -> f b (<&>) = flip (<$>)