LYAH is great. For those who are interested, there is a library, 'syz' (Scrap Your Zippers), which provides a generic zipper for any data type, even mutually-recursive types:<p><a href="http://hackage.haskell.org/packages/archive/syz/0.2.0.0/doc/html/Data-Generics-Zipper.html" rel="nofollow">http://hackage.haskell.org/packages/archive/syz/0.2.0.0/doc/...</a><p>Its internals are pretty interesting if you've ever thought about implementing a generic zipper structure. For example it uses Typeable to reify the focus type.<p>I'm finishing up my own generic zipper library which I hope will be simpler and more useful than syz.
Here's a challenge: Design a zipper that works for cyclic graphs. There will be 10 GBP for the winner's charity of choice. (jacquesm may give another 10 Euro in addition.)<p>(Hint: "Purely Functional Datastructures" solves this problem for graphs shaped like a sigle ring. Perhaps this solution can be generalized?)
Clojure also has a pretty neat zipper library in contrib. I've used it in projects and I wish I had introductory material as great as this tutorial back then.
I've had an investigation on the backburner for a while on whether there's a zipper-like structure for representing 2D grids (eg, a game board). I feel like this may be a blind alley, because a grid would have cycles and no inherent ordering. Can anybody shed some light on this?
Another good introduction to zippers that helped me understand them in plain terms is: <a href="http://blog.ezyang.com/2010/04/you-could-have-invented-zippers" rel="nofollow">http://blog.ezyang.com/2010/04/you-could-have-invented-zippe...</a>