case classReplaceWith[Item <: LeftLike[Item, Tree[Item, Section, CC]], Section, CC[_]](f: utils.PathFoldR[Item, Section, CC], wholeTree: Boolean = false)(implicit seqLikeThing: SeqLikeThing[CC[_], utils.ItemOrTree[Item, Section, CC], CC]) extends FoldOperation[Item, Section, CC] with Product with Serializable
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.
Linear Supertypes
Serializable, Serializable, Product, Equals, FoldOperation[Item, Section, CC], AnyRef, Any
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.