packages feed

reverse-apply 2.0 → 2.0.1

raw patch · 2 files changed

+26/−4 lines, 2 files

Files

reverse-apply.cabal view
@@ -1,6 +1,6 @@  name:               reverse-apply-version:            2.0+version:            2.0.1 cabal-version:      >= 1.2 author:             Hans Hoglund maintainer:         Hans Hoglund
src/Control/Apply/Reverse.hs view
@@ -9,16 +9,38 @@ -- Stability   : stable -- Portability : portable ----- Provides a standard version of the reverse apply operator.+-- Provides the revese apply operator. --+-- The definitions of '&' and '<&>' are identical to those in the +-- <http://hackage.haskell.org/package/lens lens> package. Hopefully they could +-- move into <http://hackage.haskell.org/package/base base> +-- at some point.+-- -------------------------------------------------------------------------------------  module Control.Apply.Reverse+(+  -- ** Reverse ($)+  (&),+  (&!),++  -- ** Reverse (\<$\>)+  (<&>),  +) where +import Control.Applicative+ infixl 1 & infixl 1 &! -(&)  = flip ($)-(&!) = flip ($!)+(&) :: a -> (a -> b) -> b+(&)   = flip ($)++(&!) :: a -> (a -> b) -> b+(&!)  = flip ($!)++infixl 1 <&>+(<&>) :: Functor f => f a -> (a -> b) -> f b+(<&>) = flip (<$>)