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

    Function maximumNode

    • Return the largest value in the tree according to the given order.

      Type Parameters

      • A

      Parameters

      • Order: Order<A>

      Returns (tree: Tree<A>) => A

      import {from, of, maximumNode} from 'effect-tree'
      import {Number} from 'effect'

      const tree = from(100, of(10), from(1_000, of(1)))

      expect(maximumNode(Number.Order)(tree)).toBe(1_000)