I used the State monad to implement a Brainfuck [1] interpreter a few months ago. It stored the program counter, pointer and the memory of the machine.
There might have been a different (better?) way, but as I was trying to learn more about monads, it was an obvious choice. Thomas [1] http://www.muppetlabs.com/~breadbox/bf/ On Mon, Jul 6, 2009 at 18:54, Thomas Hartman<tphya...@gmail.com> wrote: > Can someone give some simple common scenarios where the state monad is > useful, besides labeling trees? > > References to puzzles like those in project Euler or similar would be nice. > > Thanks! > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe