Skip to content

tree

tree<T>(x, children?): Tree<T>

Helper function to build a tree node.

Type Parameters

T

Parameters

x

T

The node value.

children?

Iterable<Tree<T>>

The children attached to the node,

Returns

Tree<T>

A tree.