Function reduce

  • Recursively reduce a tree to a single value

    Parameters

    • node: Node
    • callback: Function

      takes in the current accumulator and node and returns the new accumulator

    • initialValue: any

    Returns any

    the reduced value

Generated using TypeDoc