[Haskell-cafe] Prelude.head: empty list

Evan Laforge qdunkan at gmail.com
Fri Mar 11 17:34:31 UTC 2016


On Fri, Mar 11, 2016 at 7:56 AM, Han Joosten <han.joosten.han at gmail.com> wrote:
> Of course I know that head is partial, and should be used with care.

How about never?  I do fine with either case and a Maybe-returning
variant.  So if I see that error it's definitely library code... which
unfortunately has happened a few times.  I wish library authors went
with "never" as well!


More information about the Haskell-Cafe mailing list