Beispiel #1
0
            public B Reduce(B[] values)
            {
                A[] wrappedValues = values.Select(wrap).ToArray();
                A   a             = other.Reduce(wrappedValues.ToArray());

                return(unwrap(a));
            }
Beispiel #2
0
        public Grade FinalGrade(IValueReducer <Grade> method)
        {
            var hwGrade = method.Reduce(homeworks);

            return(0.3 * hwGrade + 0.7 * exam);
        }