class ShallowFolder [ X ]
extends TreeAccumulator

Fold f over all tree nodes, in depth-first, prefix order, but don't visit subtrees where f returns a different result for the root, i.e. f(x, root) ne x.

Constructors

ShallowFolder ( f: (X, Tree) => X )

Members

[+] private val f : (X, Tree) => X
[+] def apply ( x: X , tree: Tree ) ( implicit ctx: Context ) : X