[Haskell-cafe] Re: stateful walk through a tree?

apfelmus at quantentunnel.de apfelmus at quantentunnel.de
Mon Feb 19 05:10:00 EST 2007


David Tolpin wrote:
> I am looking for help in design of a stateful tree walker.

I think that you can use Data.Traversable to great effect. Related to
that are Control.Applicative and Data.Foldable. The papers that are
mentioned in the Haddocks explain what these modules do and what they
are useful for.

> How would I do that in Haskell? I'd like to avoid using mutable variables for now
> (mostly for didactic puproses).

Well, Haskell doesn't have mutable variables as LISP or ML do. In the
end, avoiding mutable variables is more useful for non-didactic purposes :)

Regards,
apfelmus



More information about the Haskell-Cafe mailing list