> On 6 Apr 2016, at 18:57, Xiaodi Wu via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Meanwhile, I was trying to talk about something like `stride(from: 200, to: 
> 0, by: -2)`, which is easily expressed today but isn't straightforward at all 
> to preserve with only ranges.

Precisely because the free function is also range-free, the sign of the step 
need not repeat the direction intent which is already indicated with `from: 
200, to: 0`. In other words, I think this is much more intuitive:

     `stride(from: 200, to: 0, by: 2)`

milos
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to