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

Milos Rankovic milos at milos-and-slavica.net
Wed Apr 6 13:37:52 CDT 2016


> On 6 Apr 2016, at 19:16, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> We prefer methods to free functions.

However, `(from:to:by)` need not be a free function, it could be a sequence initialiser:

    Walk(from: 200, to: 0, by: 2)

or:

    Steps(from: 200, to: 0, by: 2)

or something along those lines...

milos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160406/32c2f055/attachment.html>


More information about the swift-evolution mailing list