Get the forest of any tree node. Result could be an empty list if the given node is a Leaf.
See getBranchForest for a version that returns the non-empty forest of a branch.
Underlying tree type.
The tree being queried.
A possibly empty list of trees.
import * as Tree from 'effect-tree'const tree = Tree.tree(1, [Tree.leaf(2), Tree.leaf(3)])expect(Tree.getForest(tree)).toEqual([Tree.leaf(2), Tree.leaf(3)]) Copy
import * as Tree from 'effect-tree'const tree = Tree.tree(1, [Tree.leaf(2), Tree.leaf(3)])expect(Tree.getForest(tree)).toEqual([Tree.leaf(2), Tree.leaf(3)])
Get the forest of any tree node. Result could be an empty list if the given node is a Leaf.
See getBranchForest for a version that returns the non-empty forest of a branch.