[Haskell-cafe] pattern matching instead of prelude.head
maydwell at gmail.com
Fri Sep 16 04:29:14 CEST 2011
Pattern matching will warn you if you neglect to consider the empty list.
On Fri, Sep 16, 2011 at 10:24 AM, Michael Litchard <michael at schmong.org> wrote:
> Someone commented on StackOverflow that pattern matching the first
> element of a list was preferable to head. This makes sense
> intuitively. Could someone articulate the reason why this is true?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe