Move to the next position in depth-first left-to-right order, or throw if impossible
Move to the next position in depth-first right-to-left order, or throw if impossible
Zip to the top and return the resulting value
Cycle through the moves until a failure is produced and return the last success
Delete the value in focus and move to the next position in depth-first right-to-left order, or throw if impossible
Delete the value in focus and move to the next position in depth-first left-to-right order, or throw if impossible
Delete the value in focus and move left, or throw if impossible
Delete the value in focus and move right, or throw if impossible
Delete the value in focus and move up, or throw if impossible
Move down left and insert a list of values on the left, focusing on the first one
Move down right and insert a list of values on the right, focusing on the last one
Insert a new value to the left of focus
Insert a new value to the right of focus
Loop and accumulate state until a failure is produced
Loop and accumulate state until a failure is produced
Unzip the current node and focus on the nth child, or throw if impossible
Unzip the current node and focus on the left child, or throw if impossible
Unzip the current node and focus on the right child, or throw if impossible
Move left or throw if impossible
Move left by n or throw if impossible
Move right or throw if impossible
Move right by n or throw if impossible
Zip the current layer and move up, or throw if impossible
Repeat a move n
times or throw if impossible
Repeat a move while the condition is satisfied or throw if impossible
Repeat a move while the condition is satisfied or throw if impossible
the first zipper that does not satisfy the condition
Repeat a move while the condition is not satisfied or throw if impossible
Repeat a move while the condition is not satisfied or throw if impossible
the first zipper that satisfies the condition
Move to the leftmost position
Move to the rightmost position
Replace the focus with a different value
Perform a side-effect on the focus
Move to the next position in depth-first left-to-right order
Move to the next position in depth-first right-to-left order
Delete the value in focus and move to the next position in depth-first right-to-left order
Delete the value in focus and move to the next position in depth-first left-to-right order
Delete the value in focus and move left
Delete the value in focus and move right
Delete the value in focus and move up
Move down left and insert a list of values on the left, focusing on the first one
Move down right and insert a list of values on the right, focusing on the last one
Unzip the current node and focus on the nth child
Unzip the current node and focus on the left child
Unzip the current node and focus on the right child
Move left
Move left by n
Move right
Move right by n
Zip the current layer and move up
Repeat a move n
times
Repeat a move while the condition is satisfied
Repeat a move while the condition is satisfied
the first zipper that does not satisfy the condition, or failure
Repeat a move while the condition is not satisfied
Repeat a move while the condition is not satisfied
the first zipper that satisfies the condition, or failure
Update the focus by applying a function
A Zipper allows to move around a recursive immutable data structure and perform updates.
Example:
See https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf.