symmetric-properties

Monoids for sameness and uniqueness.

https://github.com/joelburget/symmetric-properties#readme

Latest on Hackage:0.1.0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Joel Burget
Maintained by [email protected]

Test whether every element of a Foldable is the Same or Unique.

> allSame (replicate 1000 1)
True
> allSame [1..]
False
> allUnique [1..1000]
True
> allUnique (cycle [1..100])
False