summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmchale <>2017-08-12 21:31:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-08-12 21:31:00 (GMT)
commitd05a6ebefacae4586783d566b3cb4ab4c91a950d (patch)
tree592beefe45af445374bd5d45609967191cdddb15
parent53ab455289ded1541af7dde66c9daa9e1a98a775 (diff)
version 0.1.0.20.1.0.2
-rw-r--r--composition-prelude.cabal4
-rw-r--r--src/Control/Composition.hs6
2 files changed, 8 insertions, 2 deletions
diff --git a/composition-prelude.cabal b/composition-prelude.cabal
index 7a7584a..ece775a 100644
--- a/composition-prelude.cabal
+++ b/composition-prelude.cabal
@@ -1,5 +1,5 @@
name: composition-prelude
-version: 0.1.0.1
+version: 0.1.0.2
synopsis: Higher-order function combinators
description: Replacement for `composition` or `composition-exta`, exporting everything in one sane module.
homepage: https://github.com/vmchale/composition-prelude#readme
@@ -24,7 +24,7 @@ Flag development {
library
hs-source-dirs: src
exposed-modules: Control.Composition
- build-depends: base >= 4.7 && < 5
+ build-depends: base >= 4.9 && < 5
default-language: Haskell2010
if flag(development)
ghc-options: -Werror
diff --git a/src/Control/Composition.hs b/src/Control/Composition.hs
index 9a6968d..e3ff2cd 100644
--- a/src/Control/Composition.hs
+++ b/src/Control/Composition.hs
@@ -30,6 +30,12 @@ import Data.Function (fix, on, (&))
infixr 8 .*
infixr 8 -.*
+{-fish' :: (a -> c -> b) -> (b -> c -> c) -> a -> c -> c
+fish' f g x y = g (f x y) y
+
+fish :: (a -> c -> b) -> (b -> c -> c) -> (a -> c -> c)
+fish = (>=>)-}
+
both :: (a -> b) -> (a, a) -> (b, b)
both = join (***)