public IntList Filter(IntPredicate p) { IntList res = new IntList(); foreach (int i in this) { if (p(i)) { res.Add(i); } } return(res); }