diff options
| author | Joey Hess <joey@kitenet.net> | 2014-05-14 19:47:17 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-05-14 19:47:17 -0400 |
| commit | 39217c55690de5641a9fe4ef2236d6127ebbcbb3 (patch) | |
| tree | 31284fd462e2d02cf9bf0b8077c0e8dd34181988 /src/Utility/Applicative.hs | |
| parent | eb6e6fe11290971b37a18d9a78f6d9b78228c06f (diff) | |
| parent | 7115d1ec162b4059b3e8e8f84bd8d5898c1db025 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Utility/Applicative.hs')
| -rw-r--r-- | src/Utility/Applicative.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Utility/Applicative.hs b/src/Utility/Applicative.hs new file mode 100644 index 00000000..fd8944b2 --- /dev/null +++ b/src/Utility/Applicative.hs @@ -0,0 +1,16 @@ +{- applicative stuff + - + - Copyright 2012 Joey Hess <joey@kitenet.net> + - + - License: BSD-2-clause + -} + +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 <$$> |
