Minor containers API changes
qdunkan at gmail.com
Mon Nov 28 21:54:17 CET 2011
> The left folds are pretty new in the library (the commit log states 13
> Jul 2011), so it definitely was not possible at that time.
Ahh, nice. Ok, I guess toDescList is no longer necessary. I still
like it though, because it's exactly the way I want to iterate over a
map (i.e., as a [(k, a)]). If it disappeared I would just add it back
to my util library. Were I a new user, I'd look at toAscList and
wonder where toDescList went. That you can left fold with (:) and
make one may not be obvious to a beginner (it wasn't to me, back in
the day). On the other hand it's better to teach people about general
forms and composition than use specializations all the time.
But still, I have a mild preference for keeping it.
You know, something else I've noticed is that Data.Map is by far my
most common haddock destination. So I think there's something to the
idea that there are too many functions to memorize, even for frequent
users, and we should emphasize combining forms over specific
More information about the Libraries