Whether the focus is on the last element in the zipper.
Whether the focus is on the first element in the zipper.
An alias for deleteRight
An alias for deleteRightC
Deletes the element at focus and moves the focus to the left.
Deletes the element at focus and moves the focus to the left. If there is no element on the left, focus is moved to the right.
Deletes the focused element and moves focus to the left.
Deletes the focused element and moves focus to the left. If the focus was on the first element, focus is moved to the last element.
Deletes the focused element and moves focus to the left.
Deletes the focused element and moves focus to the left. If the focus was on the first element, focus is moved to the last element.
Deletes the element at focus and moves the focus to the left.
Deletes the element at focus and moves the focus to the left. If there is no element on the left, focus is moved to the right.
Deletes all elements except the focused element.
Deletes the element at focus and moves the focus to the right.
Deletes the element at focus and moves the focus to the right. If there is no element on the right, focus is moved to the left.
Deletes the focused element and moves focus to the right.
Deletes the focused element and moves focus to the right. If the focus was on the last element, focus is moved to the first element.
Deletes the focused element and moves focus to the right.
Deletes the focused element and moves focus to the right. If the focus was on the last element, focus is moved to the first element.
Deletes the element at focus and moves the focus to the right.
Deletes the element at focus and moves the focus to the right. If there is no element on the right, focus is moved to the left.
Moves focus to the end of the zipper.
Given a traversal function, find the first element along the traversal that matches a given predicate.
Moves focus to the nearest element on the right that matches the given predicate, or None if there is no such element.
Moves focus to the previous element on the left that matches the given predicate, or None if there is no such element.
Moves focus to the nearest element matching the given predicate, preferring the left, or None if no element matches.
Moves focus to the nearest element matching the given predicate, preferring the left, or the default if no element matches.
The index of the focus.
An alias for insertRight
Inserts an element to the left of focus and focuses on the new element.
Inserts an element to the right of focus and focuses on the new element.
Apply f to the focus and update with the result.
Moves focus n elements in the zipper, or None if there is no such element.
Moves focus n elements in the zipper, or None if there is no such element.
number of elements to move (positive is forward, negative is backwards)
Moves focus to the nth element of the zipper, or the default if there is no such element.
Possibly moves to next element to the right of focus.
Moves focus to the next element.
Moves focus to the next element. If the last element is currently focused, loop to the first element.
Possibly moves to next element to the right of focus.
A zipper of all positions of the zipper, with focus on the current position.
Possibly moves to the previous element to the left of focus.
Moves focus to the previous element.
Moves focus to the previous element. If the first element is currently focused, loop to the last element.
Possibly moves to previous element to the left of focus.
Moves focus to the start of the zipper.
Get the Stream representation of this Zipper.
Get the Stream representation of this Zipper. This fully traverses lefts
. rights
is
not evaluated.
Moves to the next element to the right of focus, or error if there is no element on the right.
Moves to the previous element to the left of focus, or error if there is no element on the left.
Update the focus in this zipper.
Pairs each element with a boolean indicating whether that element has focus.
Provides a pointed stream, which is a non-empty zipper-like stream structure that tracks an index (focus) position in a stream. Focus can be moved forward and backwards through the stream, elements can be inserted before or after the focused position, and the focused item can be deleted.
Based on the pointedlist library by Jeff Wheeler.