With the removal of the traditional C-style for-loop in Swift 3.0, how can I do the following?
for (i = 1; i < max; i+=2) {
// Do something
}
In Python, the for-in control flow statement has an optional step value:
for i in range(1, max, 2):
# Do something
But the Swift range operator appears to have no equivalent:
for i in 1..<max {
// Do something
}