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

    Function getBranchForest

    • Get the forest of a branch node.

      Type Parameters

      • A

        Underlying tree type.

      Parameters

      • self: Branch<A>

        the branch to query.

      Returns readonly [Tree<A>, Tree<A>]

      The non-empty forest of the given branch..

      import * as Tree from 'effect-tree'

      const branch = Tree.branch(1, [Tree.of(2)])

      expect(Tree.getForest(branch)).toEqual([Tree.of(2)])