Description
Zippers are a functional construct for looking at trees without losing sight of their context. Simple recursion (which loses context that isn't explicitly passed into the tail call) likely isn't sufficient for everything people want to do and the creation of IDs requires being sensitive to a node's location within the tree (which, again, zippers are good at).
https://en.wikipedia.org/wiki/Zipper_(data_structure)
"Almost every programmer has faced the problem of representing a tree together with a
subtree that is the focus of attention, where that focus may move left, right, up, or down
the tree. The Zipper is Huet’s nifty name for a nifty data structure which fulfills this need.
I wish I had known of it when I faced this task, because the solution I came up with was
not quite so efficient or elegant as the Zipper."
http://gallium.inria.fr/~huet/PUBLIC/zip.pdf