Example #1
0
 /// <summary>
 ///   <para>Return list, reversed or not, with elements not fulfilling [f] removed.
 ///  Avoid allocation if possible.
 ///
 /// </para>
 /// </summary>
 public list <T> RevFilterWhenNeeded(Function <T, bool> f)
 {
     return((!NList.ForAll <T>(this, f)) ? NList.RevFilter <T>(this, f) : this);
 }
Example #2
0
 /// <summary>
 ///   <para>Removes elements for which predicate is false.
 ///  The resulting list is reversed (operation is faster this way).
 ///
 /// </para>
 /// </summary>
 public list <T> RevFilter(Function <T, bool> f)
 {
     return(NList.RevFilter <T>(this, f));
 }