« first day (1273 days earlier)      last day (1603 days later) » 

10:01 PM
42
Q: How can I do a Swift for-in loop with a step?

Adam SWith 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 operat...

 
 
1 hour later…
11:17 PM
1 message moved from SO Close Vote Reviewers
 

« first day (1273 days earlier)      last day (1603 days later) »