Return direct child count for root node of given tree.
See nodeCount for a version that count all nodes and not just direct children.
Underlying tree type.
The tree being queried.
Numeric child count.
import * as Tree from 'effect-tree'const tree = Tree.tree(1, [Tree.leaf(2), Tree.leaf(3)])expect(Tree.length(tree)).toBe(2) Copy
import * as Tree from 'effect-tree'const tree = Tree.tree(1, [Tree.leaf(2), Tree.leaf(3)])expect(Tree.length(tree)).toBe(2)
Return direct child count for root node of given tree.
See nodeCount for a version that count all nodes and not just direct children.