NonEmpty

Library providing a non-empty list datatype, and total functions operating on it

Latest on Hackage: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 Robin Green
Maintained by Robin Green

When you want to state that a list should always be non-empty, you can use this type. This enables you to avoid the error of taking the head or tail of an empty list.