data-extra 2.4.0 → 2.5.0
raw patch · 2 files changed
+11/−4 lines, 2 files
Files
- data-extra.cabal +1/−1
- src/Data/Bool/Extra.hs +10/−3
data-extra.cabal view
@@ -1,5 +1,5 @@ name: data-extra-version: 2.4.0+version: 2.5.0 synopsis: Extra utilities for working on Data.* types. description: Extra utilities for working on Data.* types. license: BSD3
src/Data/Bool/Extra.hs view
@@ -1,7 +1,14 @@ -- | Extra functions for dealing with Bool. -module Data.Bool.Extra (bool) where+module Data.Bool.Extra+ (bool+ ,cond)+ where -- | An if/else condition on the given value.-bool :: (a -> b) -> (a -> b) -> (a -> Bool) -> a -> b-bool true false p v = if p v then true v else false v+bool :: a -> a -> Bool -> a+bool false true p = if p then true else false++-- | An if/else condition on the given value.+cond :: (a -> b) -> (a -> b) -> (a -> Bool) -> a -> b+cond false true p v = if p v then true v else false v