higherorder (empty) → 0.0
raw patch · 5 files changed
+39/−0 lines, 5 filesdep +basesetup-changed
Dependencies added: base
Files
- Data/Bool/Higher.hs +10/−0
- Data/List/Higher.hs +10/−0
- LICENSE +0/−0
- Setup.lhs +3/−0
- higherorder.cabal +16/−0
+ Data/Bool/Higher.hs view
@@ -0,0 +1,10 @@+module Data.Bool.Higher ((??),bool) where++import Data.Bool++(??) :: a -> a -> Bool -> a+(a ?? b) p | p = a+ | not p = b++bool :: (a -> b) -> (a -> b) -> (a -> Bool) -> a -> b+bool true false p v = false v ?? true v $ p v
+ Data/List/Higher.hs view
@@ -0,0 +1,10 @@+module Data.List.Higher+ (module Data.List+ ,list)+ where++import Data.List+import Data.Bool.Higher++list :: b -> ([a] -> b) -> [a] -> b+list nil cons = bool cons (const nil) null
+ LICENSE view
+ Setup.lhs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+> import Distribution.Simple+> main = defaultMain
+ higherorder.cabal view
@@ -0,0 +1,16 @@+name: higherorder+version: 0.0+synopsis: Some higher order functions for Bool and []+description: Some higher order functions+category: Composition+license: BSD3+license-file: LICENSE+author: Chris Done <chrisdone@gmail.com>+maintainer: chrisdone@gmail.com+build-Depends: base+cabal-Version: >= 1.2+build-type: Simple++library+ build-depends: base+ exposed-modules: Data.Bool.Higher,Data.List.Higher