@hackage plur0.2.0.0
Plurality monad: Zero, one, or at least two.
Categories
License
BSD-3-Clause
Maintainer
joelburget@gmail.com
Links
- Documentation
- No source repository
- Changelog
- Security
Versions
Installation
Tested Compilers
Dependencies (2)
- base >=4.3 && <4.14
- semigroups >=0.18 Show all…
Dependents (1)
@hackage/acme-everything
Often when counting you don't need an exact count, but only whether there are two things. Two examples:
When searching for inhabitants of a type (implementations of a program), you want to be able to tell whether there are (a) no possible inhabitants, (b) a unique inhabitant, or (c) multiple inhabitants.
When displaying the name of a variable, if there's exactly one variable of a given name ("a") you can just use that name, but if there are multiples you might use a unique id to disambiguate them ("a1" vs "a2").