effect-tree
    Preparing search index...

    Variable modForestConst

    modForest: {
        <A>(self: Tree<A>, f: EndoOf<readonly Tree<A>[]>): Tree<A>;
        <A>(f: EndoOf<readonly Tree<A>[]>): (self: Tree<A>) => Tree<A>;
    } = ...

    Run a function to change the root node forest. If the tree is a Leaf the given function will receive the empty array as a parameter, if it returns any trees then leaves will be turned into a Branches, and if it returns the empty array branches will be turned into leaves.

    Type Declaration

    Underlying tree type.

    Tree on which to run the given function.

    Function to apply on the root forest.

    The given tree with its root forest set to the result of the given function.