zipper package:zippers -is:module

Construct a Zipper that can explore anything, and start it at the Top.
This is the type of a Zipper. It visually resembles a "breadcrumb trail" as used in website navigation. Each breadcrumb in the trail represents a level you can move up to. This type operator associates to the left, so you can use a type like
Top :>> (String,Double) :>> String :>> Char
to represent a Zipper from (String,Double) down to Char that has an intermediate crumb for the String containing the Char. You can construct a Zipper into *any* data structure with zipper. You can repackage up the contents of a Zipper with rezip.
>>> rezip $ zipper 42
The combinators in this module provide lot of things you can do to the Zipper while you have it open. Note that a value of type h :> s :> a doesn't actually contain a value of type h :> s -- as we descend into a level, the previous level is unpacked and stored in Coil form. Only one value of type _ :> _ exists at any particular time for any particular Zipper.
Traversal based zippers Traversal based zippers.