The maybe-justify package

[Tags:library, public-domain, test]

[Skip to Readme]

Properties

Versions 0.1.0.0
Dependencies base (==4.*) [details]
License PublicDomain
Author taksuyu
Maintainer tak@ispabuse.org
Category Data
Source repository head: git clone https://github.com/TakSuyu/maybe-justify.git
Uploaded Wed Jun 24 20:45:30 UTC 2015 by taksuyu
Distributions NixOS:0.1.0.0
Downloads 152 total (5 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2015-06-24 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for maybe-justify

Readme for maybe-justify-0.1.0.0

Maybe you just need justify?

We've all used Maybe in a control flow

if f x then Just x else Nothing

but why not have

justify id f x

multiple constraints?

justify id (\a -> f a && g a) x

want a silly id for Maybe?

justify fromJust isJust (Just x)

This seems like such a no brainer that I'm surprised it isn't in Data.Maybe so I'm proposing that it should be and this library is just the start.

What about licensing issues?

Since I know there will be some talk about licensing, I already took the step and used the unlicense. If that isn't enough, just send a pull request changing it to an appropriate license and I'll accept.

What do I do while this isn't in Data.Maybe?

Then just go ahead and pull in maybe-justify from cabal!