foldKeptNodes<R> method
Folds fn over the kept paths.
Implementation
R foldKeptNodes<R>(R initial, R Function(Path path, R accumulator) fn) =>
forest.foldValues<R>(
initial,
(Path relativePath, bool prune, R accumulator) =>
prune ? accumulator : fn(relativePath, accumulator),
);