Proposal: add uncons (and unsnoc) to Data.List

Henning Thielemann schlepptop at henning-thielemann.de
Sun Jul 20 04:07:25 UTC 2014


Am 20.07.2014 05:01, schrieb wren romano:

> Yes, uncons is a view, but I see no benefit in naming the function
> after that fact— given that "uncons" is the standard/popular name, and
> that we don't typically name any other views "viewFoo".

As I said, I chose the name according to Data.Sequence:

http://hackage.haskell.org/package/containers-0.5.5.1/docs/Data-Sequence.html#v:viewl


There is also:
http://hackage.haskell.org/package/containers-0.5.5.1/docs/Data-Map-Lazy.html#v:minView
http://hackage.haskell.org/package/containers-0.5.5.1/docs/Data-Set.html#v:minView


But I am not bound to it.


More information about the Libraries mailing list