I found this code for C#:
public static IEnumerable<double> CumulativeSum(this IEnumerable<double> sequence)
{
double sum = 0;
foreach(var item in sequence)
{
sum += item;
yield return sum;
}
}
I'm a C# beginner so I don't know how and where put this code in the strategy.
Can someone give me some advice? thank you so much!
Comment