• Given an AVL-tree anAvlTree and a value aValue, returns a new AVL-tree where this value has been removed. If the value is not present in the tree, the tree is unchanged. The function only raises an error when called on the empty tree.

    Parameters

    • anAvlTree: AVLTree<any>

      the tree in which to remove

    • aValue: any

      the value considered

    Returns AVLTree<any>

    • a new tree with aValue removed
    • if the tree is empty