operator fun hasNext(): Boolean { return cursor > 0 }
This is used to determine if the cursor has reached the start of the list . When the cursor reaches the start of the list then this method returns false .