Comment by icen

9 years ago

Such a structure is called a Zipper, for anyone wanting to look into it further.

In this case it's a Zipper for a list. You can write zippers for other data structures as well (and in fact you can mechanically derive them, even).