Generator (computer programming): Difference between revisions

Content deleted Content added
Jespdj (talk | contribs)
Java: Fixed invalid Java examples. An Iterator is not an Iterable, and cannot be used directly in a foreach-loop.
Jespdj (talk | contribs)
m Java: Small fix in fibo Java example.
Line 371:
};
// this could then be used as...
whilefor (int f: fibo.hasNext()) {
System.out.println("next Fibonacci number is " + f);
if (someCondition(f)) break;