The underlying type of the tree.
A function that takes a zipper and returns either an updated zipper focused on a different tree node, or Option.none.
Will be matched against every tree node reached by the navigation.
An updated zipper if the search criteria matched an element along the navigation given, else Option.none.
Repeat the given navigation function of type
Zipper<A> ⇒ Option<Zipper<A>>on the focus node iteratively, updating the focus node with the result until the focus node meets the given predicate or the navigation terminates by returningOption.none, for example when reaching the last element of a forest with the tryNext navigation, or the final depth-first node of the tree with tryDepthFirst navigation.If the predicate matched, then the zipper is returned pointing at the matching tree node. If it did not, returns
Option.none.If a cycle in navigation is detected a runtime exception is thrown. Cycles are detected by checking no node is visited twice, so if your navigation does this it will throw a runtime exception even if there are no actual cycles in the navigation. Keep your navigation pointing one way, for example depth first, to avoid creating cycles.
See repeatUntilValue for a version that matches on the focused tree node value instead of the focused tree node.