• Applies an accumulator function over a sequence.

    Type Parameters

    • TSource

    Parameters

    • src: Iterable<TSource>

      An Enumerable to aggregate over.

    • aggregator: (prev: TSource, curr: TSource, index: number) => TSource

      An accumulator function to be invoked on each element.

    Returns TSource

    The final accumulator value.

    TSource The type of the elements of source.

  • Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.

    Type Parameters

    • TSource
    • TAccumulate

    Parameters

    Returns TAccumulate

    The final accumulator value.

    TSource The type of the elements of source.

    TAccumulate The type of the accumulator value.

  • Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.

    Type Parameters

    • TSource
    • TAccumulate
    • TResult

    Parameters

    • src: Iterable<TSource>

      An Enumerable to aggregate over.

    • seed: TAccumulate

      The initial accumulator value.

    • aggregator: (prev: TAccumulate, curr: TSource, index: number) => TAccumulate

      An accumulator function to be invoked on each element.

    • resultSelector: (accumulated: TAccumulate) => TResult

      An accumulator function to be invoked on each element.

    Returns TResult

    The final accumulator value.

    TSource The type of the elements of source.

    TAccumulate The type of the accumulator value.

    TResult The type of the resulting value.

  • Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.

    Type Parameters

    • TSource
    • TAccumulate
    • TResult

    Parameters

    Returns TAccumulate | TSource | TResult

    The final accumulator value.

    TSource The type of the elements of source.

    TAccumulate The type of the accumulator value.

    TResult The type of the resulting value.