> On 12. Oct 2017, at 01:17, Kelvin Ma via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> On Wed, Oct 11, 2017 at 6:06 PM, Nevin Brackett-Rozinsky 
> <nevin.brackettrozin...@gmail.com <mailto:nevin.brackettrozin...@gmail.com>> 
> wrote:
> On Wednesday, October 11, 2017, Kelvin Ma via swift-evolution 
> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:
> Yes, a 0-ary operator like that would have to be hard baked into the language 
> itself.
> 
> Actually, you can just make a subscript which takes a function as an 
> argument, and call it by passing in the ellipsis operator.
> 
> I mean,,, you can,,, but that’s kind of weird

That's exactly how the [...] notation is implemented in the stdlib. Toni Suter 
wrote a great article about it: 
https://tonisuter.com/blog/2017/08/unbounded-ranges-swift-4/ 
<https://tonisuter.com/blog/2017/08/unbounded-ranges-swift-4/>

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

Reply via email to