/**
* Iterate over the Tree in breadth-first order, applying `f`
*
* @tsplus static Tree.Aspects forEach
* @tsplus pipeable Tree forEach
*/
export function forEach(f: (a: A) => U) {
return (self: Tree): void => {
f(self.value)
self.forest.map((a: Tree) => a.forEach(f))
}
}