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

    Function asOrdinal

    • Replaces all tree nodes with their unique ordinal. The order is depth-first post-order, so that the root node value is the maximum. For example a tree shaped so:

       ┬?
      ├─?
      └┬?
      ├─?
      └─?

      Will become this tree:

      5
      ├─1
      └┬4
      ├─2
      └─3

      Under the pre key you will find a version that does the same but in depth-first pre-order, and under the breadthFirst key you will find a version that does the same but in breadth-first order.

      Parameters

      • initialize: number

      Returns (self: Tree<any>) => Tree<number>

    Index

    Methods

    • Type Parameters

      • A

      Parameters

      • order: Order<A>

      Returns (start: number) => (self: Tree<A>) => Tree<number>