Data.IntMap/IntSet inconsistencies

Twan van Laarhoven twanvl at gmail.com
Mon Nov 2 18:43:41 EST 2009


Evan Laforge wrote:

> As far as findMin, toAscList works just as well, so fine, let's kill
> it.  For findMax, toDescList, which I thought was patched in a year
> ago, still doesn't appear in the latest version of collections, so as
> far as I know there's no alternative for it.

The fact that a function can be written in terms of other things in the library 
is no excuse not to include it. If a program somewhere needs to find the 
smallest key in a map, then it should say so! findMin makes the intention of the 
programmer clear, while toAscList does not.


Twan


More information about the Libraries mailing list