[plt-scheme] help on how to write a frequency-counting function in a more functional way

From: Noel Welsh (noelwelsh at gmail.com)
Date: Mon Apr 20 09:41:32 EDT 2009

I'd like to retract this statement. I think this is too confusing and
possibly controversial to be useful in the context of this discussion.


On Mon, Apr 20, 2009 at 6:58 AM, Noel Welsh <noelwelsh at gmail.com> wrote:
> For this problem imperative = functional. The problem is basically a
> fold over a list. If the seed/accumulator of the fold never leaks
> outside the fold (i.e. it cannot be observed until the fold is
> complete) you can mutate it all you want and still have a functional
> implementation. This is related to the list monad, but I'm not
> entirely precise on the details so I won't attempt an explanation.

Posted on the users mailing list.