TreeNodeUnaryOperator<K> typedef
Function that transforms a tree node, optionally returning a new node.
Used for operations like updating, replacing, or removing nodes. Return null to remove the node, or return a modified node to replace it.
Implementation
typedef TreeNodeUnaryOperator<K> = TreeNode<K>? Function(TreeNode<K> node);