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

    Function nodeCount

    • Count all nodes that are descendants of the root node and the root node itself.

      Type Parameters

      • A

      Parameters

      Returns number

      import {tree, from, of, nodeCount} from 'effect-tree'
      import {pipe} from 'effect'

      const actual = pipe(
      [of(2), from(3, of(4), of(5)), of(6)],
      tree.flipped(1),
      nodeCount
      )

      expect(actual).toBe(6)