
Concerning this exercise, would it be simply possible to take the most of
lazy evaluation and build a graph?
A node would be:
Node a = Node { data :: a,
parents :: [Node a],
children :: [Node a] }
Then, whichever node you are on, you can still directly find its
predecessors, i.e. your way back in the labyrinth.
I find it more simple than a zipper (of course, now you cannot serialize it,
due to the cross-references).
2011/3/16 Andrew Coppin
On 15/03/2011 11:35 PM, Brent Yorgey wrote:
I am pleased to announce that the special Poetry and Fiction Edition of The Monad.Reader is now available [1]. Enjoy!
I love exercise 8, "write a complete computer game using this idea" (!)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe