|
|
От: |
Sinclair
|
https://github.com/evilguest/ |
| Дата: | 06.05.25 16:21 | ||
| Оценка: | |||
public static IEnumerable<int> GetAccumulatingSum(this IEnumerable<int> source)
{
if(source == null)
throw new ArgumentNullException(nameof(source));
var s = 0;
foreach(var v in source)
yield return s += v;
}