[Solved] Swift `for-in` loop Range and ClosedRange errors
Swift ranges are written as 0…10, not [0…10]. [0…10] creates a single-item array. The first item in the array is a 0…10 range. Using for i in [0…10] thus iterates over that single-item array, not the range itself. The iterated value i will be of type Range or ClosedRange. To iterate over each Int in … Read more