using Gee;
int main (string[] args) {
ArrayList<string> list = new ArrayList<string>();
list.add ("a");
list.add ("b");
list.add ("c");
foreach (var s in list.filter (s => s > "a")) stdout.printf (@"s\n");
return 0;
}
This doesn't compile, because Traversable<G>.filter
doesn't return an object with an "iterate()" method, but an Iterator<G>
.
Is there any way to get foreach
working on an iterator?