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

    Function maximumNodeDegree

    • Compute the maximum child count of any node in the tree.

      Type Parameters

      • A

      Parameters

      Returns number

      import {from, of, maximumNodeDegree} from 'effect-tree'

      const tree = from(
      1,
      of(2),
      from(3, of(4), of(5), of(6), of(7), of(8)),
      from(7, of(8)),
      )

      expect(maximumNodeDegree(tree)).toBe(5)