I'm trying to set a dynamic range which changes while iterating inside a for loop. Aka: Jumping from index to index.
For example:
func func(c: [Int]) -> Int {
var currentIndex = 0
for i in currentIndex..<c.count
currentIndex += 3 //After changing the currentIndex value, will my "i" start from currentIndex?
}
So i starts with 0, then it will be 3, then 6 and so on... When I run this code, "i" sums up as usual like i = 0, i = 1, i = 2... Can I mutate the iteration range?