diff options
author | Joey Hess <id@joeyh.name> | 2015-12-15 17:47:59 -0700 |
---|---|---|
committer | Joey Hess <id@joeyh.name> | 2015-12-15 17:47:59 -0700 |
commit | 7c12f0ac9224246dac308e837bccb5b2157062ee (patch) | |
tree | 0caa943db39f9a2bfad404c547acda354076b46a /Utility/Applicative.hs | |
download | git-repair-7c12f0ac9224246dac308e837bccb5b2157062ee.tar.gz |
Import git-repair_1.20151215.orig.tar.xz
[dgit import orig git-repair_1.20151215.orig.tar.xz]
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 0000000..fce3c04 --- /dev/null +++ b/Utility/Applicative.hs @@ -0,0 +1,16 @@ +{- applicative stuff + - + - Copyright 2012 Joey Hess <id@joeyh.name> + - + - 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 <$$> |