Proposal: Non-allocating way to iterate over a Data.Map: traverseWithKey_

Edward Kmett ekmett at
Tue Jul 2 20:54:43 CEST 2013

On Tue, Jul 2, 2013 at 2:45 PM, Henning Thielemann <
lemming at> wrote:

>   Foldable.sequence_ . Map.mapWithKey f

which looks more elegant.

This has the unfortunate consequence that it builds an entire new map
strictly before sequencing it, due to the fact that Data.Map is
spine-strict. =(

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list