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));
public static T Product <T>( this IExpressionEvaluator <T> evaluator, IEnumerable <T> values ) where T : struct, IComparable <T>, IEquatable <T> => values.Aggregate(evaluator.GetValue(1), (carry, current) => evaluator.Multiply(carry, current));