Example #1
0
 /// <summary>
 ///     Applies the specified function on every item in the collection, from last to first, and stops when the function returns false.
 /// </summary>
 /// <param name="function"> The function. </param>
 /// <returns> </returns>
 /// <exception cref="ArgumentNullException">Thrown if the argument null.</exception>
 public override bool ForEachWhile(Func <T, bool> function)
 {
     function.CheckNotNull("function");
     return(Root.ForEachWhile((k, v) => function(k)));
 }
Example #2
0
 /// <summary>
 ///     Applies the specified function on every item in the collection, from last to first, and stops when the function returns false.
 /// </summary>
 /// <param name="function"> The function. </param>
 /// <returns> </returns>
 /// <exception cref="ArgumentNullException">Thrown if the argument null.</exception>
 public override bool ForEachWhile(Func <KeyValuePair <TKey, TValue>, bool> function)
 {
     function.CheckNotNull("function");
     return(_root.ForEachWhile((eqKey, v) => function(Kvp.Of(eqKey, v))));
 }