composition-prelude 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+8/−2 lines, 2 files
Files
composition-prelude.cabal view
@@ -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 @@ 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
src/Control/Composition.hs view
@@ -30,6 +30,12 @@ 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 (***)