Provides an Iterator from a given initial path that traverses the entire tree, allows both forwards and backwards iteration.
Use to make it easier to filter out large sets (for those that aren't interesting simply asis them, see tests for use case)
Iterates over paths using the document order it skips over EndElemS events when going forward and StartElem when reversing, returning just the path.
Iterates over paths using the document order it skips over EndElemS events when going forward and StartElem when reversing, returning just the path. Developers should call preceding or following before entering this iterator.
Represents the base for operations that fold over a list of paths
Position in a parent Paths children
Provide & combinator to pass the result of one fold onto the other, in the case of failure no further joined functions will be called.
Provide & combinator to pass the result of one fold onto the other, in the case of failure no further joined functions will be called.
And provides | which allows NoPaths failures, allowing the use site to decide how to combine
Utility functions for Paths, sorting, moving between Paths, getting to the root etc.
Positions only have meaning for a given Path(s).
Positions only have meaning for a given Path(s).
Their internal representation may change, as such its private to Paths.
Allows replacing one path with many, may be easier to use the * version however
Allows foldPositions to be nested, only replace and delete makes sense here (afaict).
Allows foldPositions to be nested, only replace and delete makes sense here (afaict).
As such, when wholeTree is false, the path (which must be a tree) is transformed
p => top(p.tree)
and a special case for "deletes" is made - when RemovedRoot is returned from the transformation a delete will take place on the Path. This enforces that only replace and removes are possible and function appropriately.
Warning:
When wholeTree is true the function f is passed the Path (or item) in the original tree, any transformations are then conusmed across the whole tree, which is likely not desired.
Represents the Top for a given Path, there isn't a tree above this
Provides an Iterator from a given initial path that traverses the entire tree, allows both forwards and backwards iteration.
It specifically provides an up event, allowing consumers to "pop" the element stack