<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><blockquote type="cite"><br></blockquote></div><div style="word-wrap:break-word"><div>Why?</div></div></blockquote><div><br></div><div><br></div><div>Because this works:</div><div><br></div><div><div>var rangeA = -150.0..&lt;150</div></div><div><div>for lat in rangeA.by(30) {</div><div>    print(lat)</div><div>}</div></div><div><br></div><div>And this not:</div><div><br></div><div><div>var rangeC = -150..&lt;150</div></div><div><div>for lat in rangeC.by(30) { // Error - Value of type &#39;Range&lt;Int&gt;&#39; has no member &#39;by&#39;</div><div>    print(lat)</div><div>}</div></div><div><br></div><div>I think this is expected to work, or not?</div><div><br></div><div><div>If you make a extension for &quot;Range&quot; will work of course.</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I don&#39;t understand most of what you&#39;re saying here, or why you&#39;re saying it.  The extensions as shown in Donnacha&#39;s post work for me.</div></div><div style="word-wrap:break-word"><div><br></div></div><div style="word-wrap:break-word"><br></div></blockquote><div><br></div><div>Not a big deal, just saying I think weird call &quot;startIndex&quot; and &quot;endIndex&quot; on &quot;Range&quot;, because on (HalfOpen|Close)Interval are only &quot;start&quot; and &quot;end&quot;. </div><div><br></div><div>Also is weird the existence of the 3 types for basically the same purpose.<br></div><div><br></div><div>But is not the point of this topic of course.<br></div><div><br></div></div></div>