bool-extras: A fold function for Bool
bool function allows folding over boolean values.
This is comparable to the
on their respective types.
bool function is a replacement for the build-in
if then else-syntax. However, since it is a function, it
can be partially applied and passed around to higher order
functions, like so:
ghci> :m + Data.Bool.Extras ghci> let yesOrNo = bool "no" "yes" ghci> map yesOrNo [True, False, True] ["yes", "no", "yes"]
Note that the arguments to
bool are in the opposite order
if then else-syntax; First the false value, then
the true value, and finally the boolean.
|Versions [faq]||0.2.0, 0.3.0, 0.4.0|
|Dependencies||base (<4.7) [details]|
|Author||Erik Hesselink, Jeroen Leeuwestein, Tom Lokhorst, Sebastiaan Visser|
|Maintainer||Tom Lokhorst <firstname.lastname@example.org>|
|Revised||Revision 1 made by HerbertValerioRiedel at 2018-10-01T17:54:08Z|
|Uploaded||by TomLokhorst at 2009-05-13T08:24:59Z|
|Downloads||3711 total (9 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
Docs uploaded by user
Build status unknown [no reports yet]
- bool-extras-0.2.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees