safe-foldable: Safe wrappers for null-partial Foldable operations

[ library, mit, unclassified ] [ Propose Tags ]

[Skip to Readme]
Versions [faq] 0.1.0.0
Dependencies base (>=4.7 && <5) [details]
License MIT
Copyright 2018 Theodore Lief Gannon
Author Theodore Lief Gannon
Maintainer tanuki@gmail.com
Home page https://github.com/tejon/safe-foldable#readme
Bug tracker https://github.com/tejon/safe-foldable/issues
Source repo head: git clone https://github.com/tejon/safe-foldable
Uploaded by tejon at 2018-06-06T22:14:25Z
Distributions LTSHaskell:0.1.0.0, NixOS:0.1.0.0, Stackage:0.1.0.0
Downloads 729 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-06-06 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for safe-foldable-0.1.0.0

[back to package description]

safe-foldable

Provides defaulting and mayhap to safely wrap functions on Foldables that are partial with null data.

λ. minimum []
*** Exception: Prelude.minimum: empty list
λ. minimum [3,1,2]
1

λ. defaulting 0 minimum []
0
λ. defaulting 0 minimum [3,1,2]
1

λ. mayhap minimum []
Nothing
λ. mayhap minimum [3,1,2]
Just 1