[swift-evolution] Feature proposal: Range operator with step

Stephen Canon scanon at apple.com
Wed Apr 6 13:20:17 CDT 2016


> On Apr 6, 2016, at 11:16 AM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> One question that I *do* think we should answer, is whether the elements
> of
> 
>    (0..<199).striding(by: -2)
> 
> are even or odd.

Odd.  I don’t believe that many real use cases care, but odd is more efficient from a performance perspective.  Needs to be documented clearly, however.

– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160406/5a768fb4/attachment.html>


More information about the swift-evolution mailing list