evancz/Elm — pull request #476 by Dandandan (2014-01-23 19:08:32+00:00)
Title: (Proposal) Add total functions of the common list functions to Maybe

Feel free to reject this proposal or wait on more thoughts about this.

I was a little dissapointed to see that Elm implemented head, tail, etc. with partial functions, like Haskell. Has there already been a discussion on this? Partial functions are nice to write a quick version of code, but I don't like them as they are a common source of errors.
It isn't currently possible in Elm to implement these in the List module (as there is no support for circular dependencies in the compiler).
I would rather see the following pattern:
`min = fromMaybe 0 . head`

I will propose the function fromMaybe in another pull request.