Luke Palmer wrote:
On Tue, Mar 24, 2009 at 3:15 PM, Gü?nther Schmidt gue.schm...@web.dewrote:
Hi,
let say I got an unordered lazy list of key/value pairs like
[('a', 99), ('x', 42), ('a', 33) ... ]
and I need to sum up all the values with the same keys.
So far I wrote a naive
On Thu, 26 Mar 2009, Heinrich Apfelmus wrote:
Luke Palmer wrote:
Yeah, make a trie. Here's a quick example.
Nice!
There was a thread about this question a few years ago, with some very
interesting developments like the blueprint technique by Bertram
Felgenhauer.
Dear Günther,
the map can't be consumed while it is constructed. At any point during
its construction you don't know for any key in the map if it will appear
in the not cosumed rest of the list again. This means you can't process
any entry of the map because it may change later. The only
Dear Luke,
I'm at a loss trying to figure out what is happening here, I'd sincerely
appreciate it if you could find the time to give me more clues on this,
I'm deeply impressed. If I think that what is happening *is* happening
that would mean that this is a way to group in almost constant
Dear Luke,
I suspect Black Magic at work here.
This seems to work and I so don't have a clue why. But thank you very
much nevertheless, I strongly suspect that, once I figured out why this
works, I will have learned a very, very important trick indeed.
Had I read purely functional data
Hi Ketil,
Ketil Malde schrieb:
Gü?nther Schmidt gue.schm...@web.de writes:
let say I got an unordered lazy list of key/value pairs like
[('a', 99), ('x', 42), ('a', 33) ... ]
and I need to sum up all the values with the same keys.
So far I wrote a naive implementation, using Data.Map,