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

[ library, mit, unclassified ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1232 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-06-06 [all 1 reports]

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