示例#1
0
 /// <summary>
 /// Reduces the queue in descending order.
 /// </summary>
 /// <typeparam name="A">The type of the accumulator.</typeparam>
 /// <param name="binOp">The binary operation.</param>
 /// <param name="initial">The initial accumulator value.</param>
 /// <returns>
 /// The final accumulator value.
 /// </returns>
 public A FoldRight <A>(Func <PriorityValuePair <T, TPriority>, A, A> binOp, A initial)
 {
     return(_ft.FoldRight(binOp, initial));
 }
示例#2
0
 /// <summary>
 /// Reduces the sequence in descending order.
 /// </summary>
 /// <typeparam name="A">The type of the accumulator.</typeparam>
 /// <param name="binOp">The binary operation.</param>
 /// <param name="initial">The initial accumulator value.</param>
 /// <returns>
 /// The final accumulator value.
 /// </returns>
 public A FoldRight <A>(Func <T, A, A> binOp, A initial)
 {
     return(_ft.FoldRight((el, a) => binOp(el.Value, a), initial));
 }