diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-29 10:00:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-29 10:00:05 -0400 |
commit | 29335bf32685ee665f9ec5acbcfe7f8edabd1b96 (patch) | |
tree | 87b11ade25aa99712df020063221ecd6af43b771 /Utility/Applicative.hs | |
parent | cd0ab91c91e84b726dbc3da39e57893bd1417ee9 (diff) |
pointlessness
Diffstat (limited to 'Utility/Applicative.hs')
-rw-r--r-- | Utility/Applicative.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Utility/Applicative.hs b/Utility/Applicative.hs new file mode 100644 index 000000000..64400c801 --- /dev/null +++ b/Utility/Applicative.hs @@ -0,0 +1,16 @@ +{- applicative stuff + - + - Copyright 2012 Joey Hess <joey@kitenet.net> + - + - Licensed under the GNU GPL version 3 or higher. + -} + +module Utility.Applicative where + +{- Like <$> , but supports one level of currying. + - + - foo v = bar <$> action v == foo = bar <$$> action + -} +(<$$>) :: Functor f => (a -> b) -> (c -> f a) -> c -> f b +f <$$> v = fmap f . v +infixr 4 <$$> |