Iterators

You use an iterator to go through a collection one element at a time. Examples of collections are lists and arrays.

Small example iterator

TODO

For Each number In EvenSequence(6, 19)
    Print number & $S
End
PrintLine

@Iterator Function EvenSequence(first, last As Int) As Int
    For number = first To last
        If number Mod 2 = 0 Then
            Yield number
        End
    End
End

Making a collection class

TODO

See also