Example #1
0
 public static T Sum <T>(
     this IExpressionEvaluator <T> evaluator,
     IEnumerable <T> values
     ) where T : struct, IComparable <T>, IEquatable <T> =>
 values.Aggregate(evaluator.GetValue(0), (carry, current) => evaluator.Add(carry, current));