<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I can't remember if I responded to this yet or not, since I just added an algorithm to the proposal and am finishing tweaks.</div><div class=""><br class=""></div><div class="">Strides can progress negatively as well as positively, and ranges don't support that. </div><div class=""><br class=""></div><div class="">(0.0)...(-1.2) returns fatal error: Invalid ClosedInterval bounds (end < start)</div><div class=""><br class=""></div><div class="">Take a look at the updated proposal with the more precise second algorithm.</div><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 1, 2016, at 12:44 AM, Howard Lovatt <<a href="mailto:howard.lovatt@gmail.com" class="">howard.lovatt@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Your implementation of `fstride` is faulty, it doesn't produce the `through` value. Suggest you change to:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(187, 44, 162);" class="">public<span style="" class=""> </span>extension<span style="" class=""> </span><span style="color:rgb(112,61,170)" class="">Double</span><span style="" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="color:rgb(187,44,162)" class="">public</span> <span style="color:rgb(187,44,162)" class="">func</span> doubleStride(through end: <span style="color:rgb(112,61,170)" class="">Double</span>, by stride: <span style="color:rgb(112,61,170)" class="">Double</span>) -> <span style="color:rgb(112,61,170)" class="">LazyMapCollection</span><<span style="color:rgb(112,61,170)" class="">Range</span><<span style="color:rgb(112,61,170)" class="">Int</span>>, <span style="color:rgb(112,61,170)" class="">Double</span>> {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="color:rgb(187,44,162)" class="">let</span> limit = <span style="color:rgb(112,61,170)" class="">Int</span>(<span style="color:rgb(61,29,129)" class="">trunc</span>((end - <span style="color:rgb(187,44,162)" class="">self</span>) / stride))</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="color:rgb(187,44,162)" class="">return</span> (<span style="color:rgb(39,42,216)" class="">0</span> ... limit).<span style="color:rgb(112,61,170)" class="">lazy</span>.<span style="color:rgb(61,29,129)" class="">map</span> { <span style="color:rgb(187,44,162)" class="">self</span> + <span style="color:rgb(112,61,170)" class="">Double</span>($0) * stride }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">}</div></div><div class=""><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"> -- Howard.<br class=""></div></div>
<br class=""><div class="gmail_quote">On 1 March 2016 at 12:16, Erica Sadun via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><h1 style="font-size:2.25em;margin-right:0px;margin-bottom:16px;margin-left:0px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';background-color:rgb(255,255,255);margin-top:0px!important" class=""><blockquote type="cite" style="font-family:Palatino;font-size:14px;font-weight:normal" class=""><div style="word-wrap:break-word" class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 29, 2016, at 5:03 PM, Joe Groff <<a href="mailto:jgroff@apple.com" target="_blank" class="">jgroff@apple.com</a>> wrote:</div><div class=""><div style="font-family:Palatino-Roman" class="">I agree, splitting into two proposals is a good idea.</div><div style="font-family:Palatino-Roman" class=""><br class=""></div><div style="font-family:Palatino-Roman" class="">-Joe</div></div></blockquote></div></div></blockquote></h1><h1 style="font-size:2.25em;margin-right:0px;margin-bottom:16px;margin-left:0px;line-height:1.2;padding-bottom:0.3em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';background-color:rgb(255,255,255);margin-top:0px!important" class=""><br class=""></h1></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>