effect-tree - v1.0.36
    Preparing search index...

    Function removeSlice

    • Removes deleteCount children, starting Nth the direct child of the given tree. If the tree is a branch with a single child then a Leaf is returned.

      If the given index is out-of-bounds, or the given tree is a leaf, it is returned unchanged.

      If the deleteCount is beyond the edge of the list, removes all children from the Nth index.

      Parameters

      • n: number

        Index in root node forest.

      • deleteCount: number

        Count of nodes to be deleted.

      Returns EndoK<TreeTypeLambda>

      The tree with on less node.