Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.2 KB

aggregate-right.md

File metadata and controls

34 lines (24 loc) · 1.2 KB

AggregateRight

Applies a right-associative accumulator function over a sequence. This operator is the right-associative version of the Aggregate LINQ operator.

Enumerable
    .Range(1, 5)
    .Select(i => i.ToString())
    .AggregateRight((a, b) => string.Format("({0}/{1})", a, b))

Using an overload of AggregateRight, you can also supply a seed:

Enumerable
    .Range(1, 5)
    .AggregateRight("6", (a, b) => string.Format("({0}/{1})", a, b))

For more details, see the documentation.


✏ Edit this page if you see a typo or wish to contribute an improvement. Alternatively, you can also report an issue you see.