Well... If you have something like ``` class IntRa...
# announcements
r
Well... If you have something like
Copy code
class IntRangeFromZero(val top: Int)
then simple
Copy code
val rangeTo5 = IntRangeFromZero(5)
for(i in rangeTo5) { ... }
won't work because compiler doesn't know how exactly this class is meant to be iterated over. So you are providing method which retuns iterator, probably custom one, which is the thing that is able to start somewhere and step through to somewhere else.