> > Why? >
Because this works: var rangeA = -150.0..<150 for lat in rangeA.by(30) { print(lat) } And this not: var rangeC = -150..<150 for lat in rangeC.by(30) { // Error - Value of type 'Range<Int>' has no member 'by' print(lat) } I think this is expected to work, or not? If you make a extension for "Range" will work of course. > I don't understand most of what you're saying here, or why you're saying > it. The extensions as shown in Donnacha's post work for me. > > > Not a big deal, just saying I think weird call "startIndex" and "endIndex" on "Range", because on (HalfOpen|Close)Interval are only "start" and "end". Also is weird the existence of the 3 types for basically the same purpose. But is not the point of this topic of course.
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev