export declare type Tree = { node: T; children: Forest; }; export declare type Forest = Tree[]; export declare function createLeaf(node: T): Tree; export declare function createTree(node: T, children: Forest): Tree; export declare function hasChildren(t: Tree): boolean; export declare function preorder(t: Tree): T[]; export declare function preorderF(ts: Forest): T[]; export declare function countNodes(t: Tree): number; export declare function countNodesF(ts: Forest): number;