replaceNodesWithParent<K> static method

List<TreeNode<K>> replaceNodesWithParent<K>(
  1. List<TreeNode<K>> nodes,
  2. TreeNodeUnaryOperatorWithParent<K> operator
)

Implementation

static List<TreeNode<K>> replaceNodesWithParent<K>(
    List<TreeNode<K>> nodes, TreeNodeUnaryOperatorWithParent<K> operator) {
  return _replaceNodesWithParent(null, nodes, operator) ?? nodes;
}