<div dir="ltr">A suggestion: "stride(approaching:by:)"</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 1, 2016 at 5:55 PM, Erica Sadun via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please disregard previous reply. Just realized, what about 10..>1 by -1? upTo: doesn't work there.<br>
<span class="im HOEnZb"><br>
> On Mar 1, 2016, at 10:52 AM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:<br>
><br>
</span><div class="HOEnZb"><div class="h5">> On Mon, Feb 29, 2016 at 5:14 PM, Erica Sadun via swift-evolution<br>
> <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
>> Style 1: [start, end) by interval<br>
>> This style is currently called to. I propose to rename it towards as each<br>
>> value works towards end. The final value in the progression is less than end<br>
><br>
> The current usage of 'through' seems unambiguous to me. 'to' could be<br>
> improved by using 'upTo' instead.<br>
><br>
> stride(from: 1, upTo: 10, by: 1) // [1, 10)<br>
><br>
> 'upTo' is already precedented in Collection.prefix(upTo:).<br>
><br>
> Dmitri<br>
><br>
> --<br>
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</div></div></blockquote></div><br></div>