Proposal: Non-allocating way to iterate over a Data.Map: traverseWithKey_
Edward Kmett
ekmett at gmail.com
Tue Jul 2 20:54:43 CEST 2013
On Tue, Jul 2, 2013 at 2:45 PM, Henning Thielemann <
lemming at henning-thielemann.de> 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. =(
-Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130702/ccd35374/attachment.htm>
More information about the Libraries
mailing list