I wrote up a blog post discussing tying the knot in Haskell, using doubly linked lists as a motivating example, and then demonstrating how these technique is leveraged in xml-conduit to provide XPath-style traversals.
I wonder how this relates to zippers. It sounds to me like you can avoid rebuilding the entire structure when you want to change one item by using zippers. That also makes me think of the funcitonal pearl: “Weaving a Web” by Hinze and Jeuring. I wonder what the advantages and disadvantages are for all these approaches.
Edit: I implemented and extended some of the ideas from that paper here: https://gist.github.com/noughtmare/89bb772ab8b4fb9001ce67d0a0619429
I’m not familiar enough to make a comparison, I’d certainly be interested if anyone else has any thoughts on this.