/// <summary> /// Applies an accumulator function over the values yielded from /// a data-producer. The specified seed value /// is used as the initial accumulator value, and the specified function is used /// to select the result value /// </summary> /// <typeparam name="TSource">The type of data yielded by the data-source</typeparam> /// <typeparam name="TAccumulate">The type to be used for the accumulator</typeparam> /// <param name="func">Accumulator function to be applied to each term in the sequence</param> /// <param name="seed">The initial value for the accumulator</param> /// <param name="source">The data-source for the values</param> public static IFuture <TAccumulate> Aggregate <TSource, TAccumulate> (this IDataProducer <TSource> source, TAccumulate seed, Func <TAccumulate, TSource, TAccumulate> func) { return(source.Aggregate(seed, func, x => x)); }