[ CCode ( ordering = 5 ) ]
public virtual Iterator<G> filter (owned Predicate<G> pred)
Creates a new iterator that contains only values that fulfills the predicate.
When the method is called on Iterator using the parent iterator is not allowed before the inner iterator Iterator.next return false and then it points on its last element. The resulting iterator is Iterator.valid if parent iterator is Iterator.valid and value it is pointing at fulfills the predicate.
pred |
predicate to check should the value be retained |
Iterator containing values of subsequent values of seed |