So is there any way other than returning an array from a function that is to be passed foreach statement? So I could write like that:
Iterator iter = new MyList(); foreach(item; iter){ } Otherwise I will need to write like that: foreach(item; iter.getArrayOfAvailableItems()){ }