Re: foreach statement: Are there no Iterators in D?

2015-11-08 Thread J.Frank via Digitalmars-d-learn
On Sunday, 8 November 2015 at 11:47:41 UTC, Rikki Cattermole wrote: opApply if you want 0 .. N iterations during for a foreach statement and having it reset each time. No, that won't help. I want to be able to iterate over a data set of infinite size. Otherwise you want ranges :) An input

foreach statement: Are there no Iterators in D?

2015-11-08 Thread J.Frank via Digitalmars-d-learn
Hello, I am looking for something like the "Iterator" Interface in Java or PHP. Is there something comparable in D that can be used with foreach? Thanks, J.Frank

Re: foreach statement: Are there no Iterators in D?

2015-11-08 Thread Rikki Cattermole via Digitalmars-d-learn
On 09/11/15 12:40 AM, J.Frank wrote: Hello, I am looking for something like the "Iterator" Interface in Java or PHP. Is there something comparable in D that can be used with foreach? Thanks, J.Frank opApply if you want 0 .. N iterations during for a foreach statement and having it reset

Re: foreach statement: Are there no Iterators in D?

2015-11-08 Thread rsw0x via Digitalmars-d-learn
On Sunday, 8 November 2015 at 11:57:16 UTC, J.Frank wrote: On Sunday, 8 November 2015 at 11:47:41 UTC, Rikki Cattermole wrote: opApply if you want 0 .. N iterations during for a foreach statement and having it reset each time. No, that won't help. I want to be able to iterate over a data set