You use an iterator to go through a collection one element at a time. Examples of collections are lists and arrays.
Small example iterator
For Each number In EvenSequence(6, 19) Print number & $S End PrintLine @Iterator Function EvenSequence(first, last As Int32) As Int32 For number = first To last If number Mod 2 = 0 Then Yield number End End End
Making a collection class