<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">Strideable</span><span class="" style="font-family: Times;">`</span><span class="" style="font-family: Times;">&nbsp;types represent an often needed generalisation of&nbsp;</span><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">Range</span><span class="" style="font-family: Times;">` and&nbsp;</span><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">IntervalType</span><span class="" style="font-family: Times;">`s. However,&nbsp;</span><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">Strideable</span><font face="Times" class="">`’s</font><span class="" style="font-family: Times;">&nbsp;</span><font face="Times" class="">two&nbsp;</font><font face="Times" class="">`</font><span class="" style="color: rgb(145, 84, 15); font-family: 'Source Code Pro'; font-size: 12px;">stride</span><span class="" style="font-family: Times;">`</span><font face="Times" class="">&nbsp;methods are far too verbose and unbalanced (in contrast to the natural look and feel of the two interval operators). Examples like the following&nbsp;raise&nbsp;a number of issues:</font></div><div class=""><font face="Times" class=""><br class=""></font></div><div class=""><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(255, 38, 0);">1</span>.<span class="" style="color: rgb(145, 84, 15);">stride</span>(through:&nbsp;<span class="" style="color: rgb(255, 38, 0);">5</span>, by:&nbsp;<span class="" style="color: rgb(255, 38, 0);">2</span>)&nbsp;&nbsp;<span class="" style="color: rgb(203, 203, 203);">// 1, 3, 5</span></div></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(203, 203, 203);"><br class=""></span></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><div class="" style="margin: 0px; line-height: normal;"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(255, 38, 0);">1</span>.<span class="" style="color: rgb(145, 84, 15);">stride</span>(through:&nbsp;<span class="" style="color: rgb(255, 38, 0);">5</span>, by: -<span class="" style="color: rgb(255, 38, 0);">2</span>)&nbsp;<span class="" style="color: rgb(203, 203, 203);">// []</span></div><div class=""><span class="" style="color: rgb(203, 203, 203);"><br class=""></span></div></div></div><div class=""><font face="Times" class="">1.&nbsp;</font><span class="" style="font-family: Times;">The method's verbosity keeps the bounds too far&nbsp;apart.&nbsp;</span></div><div class=""><span class="" style="font-family: Times;"><br class=""></span></div><div class=""><span class="" style="font-family: Times;">2. The dot syntax suggests that something is being done to the start bound, with the end bound playing the role of an argument, all of which does not really reflect the semantics of the call.</span></div><div class=""><span class="" style="font-family: Times;"><br class=""></span></div><div class=""><span class="" style="font-family: Times;">3. The direction in which we advance from one end to another of the interval is provided twice: once by the order of the bounds and then again by the sign of the stride argument.</span></div><div class=""><span class="" style="font-family: Times;"><br class=""></span></div><div class=""><font face="Times" class="">4. Given the conceptual proximity of&nbsp;</font><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">Strideable</span><span class="" style="font-family: Times;">`,</span><span class="" style="font-family: Times;">&nbsp;</span><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">IntervalType</span><span class="" style="font-family: Times;">` and&nbsp;</span><font face="Times" class="">`</font><span class="" style="color: rgb(73, 162, 210); font-family: 'Source Code Pro'; font-size: 12px;">Range</span><span class="" style="font-family: Times;">`, one would expect analogous ways of constructing them.</span></div><div class=""><font face="Times" class=""><br class=""></font></div><div class=""><font face="Times" class="">5.&nbsp;</font><span class="" style="font-family: Times;">The word&nbsp;“</span><span class="" style="color: rgb(145, 84, 15); font-family: 'Source Code Pro'; font-size: 12px;">stride</span><span class="" style="font-family: Times;">” is not particularly friendly to programmers whose first language is not English (again in contrast to the interval operators). This is compounded by the distinction between `</span><span class="" style="font-family: 'Source Code Pro'; font-size: 12px;">to</span><span class="" style="font-family: Times;">` and `</span><span class="" style="font-family: 'Source Code Pro'; font-size: 12px;">through</span><span class="" style="font-family: Times;">` parameters.</span></div><div class=""><span class="" style="font-family: Times;"><br class=""></span></div><div class=""><span class="" style="font-family: Times;">As already noted in this thread, we could simply extend the existing types:</span></div><div class=""><span class="" style="font-family: Times;"><br class=""></span></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">extension</span>&nbsp;<span class="" style="color: rgb(73, 162, 210);">ClosedInterval</span>&nbsp;<span class="" style="color: rgb(200, 172, 229);">where</span>&nbsp;Bound : Strideable {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">func</span>&nbsp;by(stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">Bound</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideThrough</span>&lt;<span class="" style="color: rgb(73, 162, 210);">Bound</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">let</span>&nbsp;(s, e) = stride&nbsp;<span class="" style="color: rgb(145, 84, 15);">&lt;</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">0</span>&nbsp;? (<span class="" style="color: rgb(143, 121, 58);">end</span>,&nbsp;<span class="" style="color: rgb(143, 121, 58);">start</span>) : (<span class="" style="color: rgb(143, 121, 58);">start</span>,&nbsp;<span class="" style="color: rgb(143, 121, 58);">end</span>)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;s.<span class="" style="color: rgb(145, 84, 15);">stride</span>(through: e, by: stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><span class="" style="color: rgb(200, 172, 229);"><br class=""></span></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">extension</span>&nbsp;<span class="" style="color: rgb(73, 162, 210);">HalfOpenInterval</span>&nbsp;<span class="" style="color: rgb(200, 172, 229);">where</span>&nbsp;Bound : Strideable {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">func</span>&nbsp;by(stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">Bound</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideTo</span>&lt;<span class="" style="color: rgb(73, 162, 210);">Bound</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">let</span>&nbsp;(s, e) = stride&nbsp;<span class="" style="color: rgb(145, 84, 15);">&lt;</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">0</span>&nbsp;? (<span class="" style="color: rgb(143, 121, 58);">end</span>,&nbsp;<span class="" style="color: rgb(143, 121, 58);">start</span>) : (<span class="" style="color: rgb(143, 121, 58);">start</span>,&nbsp;<span class="" style="color: rgb(143, 121, 58);">end</span>)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;s.<span class="" style="color: rgb(145, 84, 15);">stride</span>(to: e, by: stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div></div><div class=""><br class=""></div><div class="">So that:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(203, 203, 203);"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(0, 0, 0);">(</span><span class="" style="color: rgb(255, 38, 0);">1</span><span class="" style="color: rgb(0, 0, 0);">...</span><span class="" style="color: rgb(255, 38, 0);">5</span><span class="" style="color: rgb(0, 0, 0);">).</span><span class="" style="color: rgb(145, 84, 15);">by</span><span class="" style="color: rgb(0, 0, 0);">(</span><span class="" style="color: rgb(255, 38, 0);">2</span><span class="" style="color: rgb(0, 0, 0);">)&nbsp;&nbsp;</span>// 1, 3, 5</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>(<span class="" style="color: rgb(255, 38, 0);">1</span>..&lt;<span class="" style="color: rgb(255, 38, 0);">5</span>).<span class="" style="color: rgb(145, 84, 15);">by</span>(<span class="" style="color: rgb(255, 38, 0);">2</span>)&nbsp;&nbsp;<span class="" style="color: rgb(203, 203, 203);">// 1, 3</span></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><br class=""></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(203, 203, 203);"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(0, 0, 0);">(</span><span class="" style="color: rgb(255, 38, 0);">1</span><span class="" style="color: rgb(0, 0, 0);">...</span><span class="" style="color: rgb(255, 38, 0);">5</span><span class="" style="color: rgb(0, 0, 0);">).</span><span class="" style="color: rgb(145, 84, 15);">by</span><span class="" style="color: rgb(0, 0, 0);">(-</span><span class="" style="color: rgb(255, 38, 0);">2</span><span class="" style="color: rgb(0, 0, 0);">)&nbsp;</span>// 5, 3, 1</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>(<span class="" style="color: rgb(255, 38, 0);">1</span>..&lt;<span class="" style="color: rgb(255, 38, 0);">5</span>).<span class="" style="color: rgb(145, 84, 15);">by</span>(-<span class="" style="color: rgb(255, 38, 0);">2</span>)&nbsp;<span class="" style="color: rgb(203, 203, 203);">// 5, 3</span></div></div><div class=""><span class="" style="color: rgb(203, 203, 203);"><br class=""></span></div><div class="">More exotically, we could make use of subscripts:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">extension</span>&nbsp;<span class="" style="color: rgb(73, 162, 210);">ClosedInterval</span>&nbsp;<span class="" style="color: rgb(200, 172, 229);">where</span>&nbsp;Bound : Strideable {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">subscript</span>(stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">Bound</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideThrough</span>&lt;<span class="" style="color: rgb(73, 162, 210);">Bound</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;<span class="" style="color: rgb(145, 84, 15);">by</span>(stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><br class=""></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">extension</span>&nbsp;<span class="" style="color: rgb(73, 162, 210);">HalfOpenInterval</span>&nbsp;<span class="" style="color: rgb(200, 172, 229);">where</span>&nbsp;Bound : Strideable {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">subscript</span>(stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">Bound</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideTo</span>&lt;<span class="" style="color: rgb(73, 162, 210);">Bound</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;<span class="" style="color: rgb(145, 84, 15);">by</span>(stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div></div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>(<span class="" style="color: rgb(255, 38, 0);">1</span>...<span class="" style="color: rgb(255, 38, 0);">5</span>)<span class="" style="color: rgb(145, 84, 15);">[</span>-<span class="" style="color: rgb(255, 38, 0);">2</span><span class="" style="color: rgb(145, 84, 15);">]&nbsp;</span><span class="" style="color: rgb(203, 203, 203);">// 5, 3, 1</span></div></div><div class=""><br class=""></div><div class="">Or introduce a new, or overload an existing operator, with precedence just lower than the two interval operators. For example:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">func</span>&nbsp;&gt; &lt;T&gt; (i:&nbsp;<span class="" style="color: rgb(73, 162, 210);">ClosedInterval</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt;, stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">T</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideThrough</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;i.<span class="" style="color: rgb(143, 121, 58);">start</span>.<span class="" style="color: rgb(145, 84, 15);">stride</span>(through: i.<span class="" style="color: rgb(143, 121, 58);">end</span>, by: stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><br class=""></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">func</span>&nbsp;&lt; &lt;T&gt; (i:&nbsp;<span class="" style="color: rgb(73, 162, 210);">ClosedInterval</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt;, stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">T</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideThrough</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;i.<span class="" style="color: rgb(143, 121, 58);">end</span>.<span class="" style="color: rgb(145, 84, 15);">stride</span>(through: i.<span class="" style="color: rgb(143, 121, 58);">start</span>, by:&nbsp;<span class="" style="color: rgb(145, 84, 15);">-</span>stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><br class=""></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">func</span>&nbsp;&gt; &lt;T&gt; (i:&nbsp;<span class="" style="color: rgb(73, 162, 210);">HalfOpenInterval</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt;, stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">T</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideTo</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;i.<span class="" style="color: rgb(143, 121, 58);">start</span>.<span class="" style="color: rgb(145, 84, 15);">stride</span>(to: i.<span class="" style="color: rgb(143, 121, 58);">end</span>, by: stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><br class=""></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">func</span>&nbsp;&lt; &lt;T&gt; (i:&nbsp;<span class="" style="color: rgb(73, 162, 210);">HalfOpenInterval</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt;, stride:&nbsp;<span class="" style="color: rgb(73, 162, 210);">T</span>.Stride) -&gt;&nbsp;<span class="" style="color: rgb(73, 162, 210);">StrideTo</span>&lt;<span class="" style="color: rgb(73, 162, 210);">T</span>&gt; {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">return</span>&nbsp;i.<span class="" style="color: rgb(143, 121, 58);">end</span>.<span class="" style="color: rgb(145, 84, 15);">stride</span>(to: i.<span class="" style="color: rgb(143, 121, 58);">start</span>, by:&nbsp;<span class="" style="color: rgb(145, 84, 15);">-</span>stride)</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div></div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">for</span>&nbsp;i&nbsp;<span class="" style="color: rgb(200, 172, 229);">in</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">1</span>...<span class="" style="color: rgb(255, 38, 0);">5</span>&nbsp;<span class="" style="color: rgb(145, 84, 15);">&lt;</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">2</span>&nbsp;{</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(203, 203, 203);"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(0, 0, 0);">i&nbsp;</span>// 5, 3, 1</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; min-height: 15px;"><br class=""></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">for</span>&nbsp;i&nbsp;<span class="" style="color: rgb(200, 172, 229);">in</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">1</span>...<span class="" style="color: rgb(255, 38, 0);">5</span>&nbsp;<span class="" style="color: rgb(145, 84, 15);">&gt;</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">2</span>&nbsp;{</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(203, 203, 203);"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(0, 0, 0);">i&nbsp;</span>// 1, 3, 5</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div></div><div class=""><br class=""></div><div class="">Not to mention a C-style `for` loop lookalike:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">for</span>&nbsp;i&nbsp;<span class="" style="color: rgb(200, 172, 229);">in</span>&nbsp;(<span class="" style="color: rgb(255, 38, 0);">1</span>&nbsp;<span class="" style="color: rgb(200, 172, 229);">to</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">5</span>&nbsp;<span class="" style="color: rgb(200, 172, 229);">by</span>&nbsp;<span class="" style="color: rgb(255, 38, 0);">2</span>) {</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro'; color: rgb(203, 203, 203);"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span><span class="" style="color: rgb(0, 0, 0);">i&nbsp;</span>// 1, 3, 5</div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>}</div></div><div class=""><br class=""></div><div class="">Obviously, this whole thread is related to the C-style `for` loop (which is more general than all of the above solutions) as well as to Haskell-style list comprehension syntax (which remains enviable). Nevertheless, I do think that a focused, lightweight feature would be the best fit for such a common need (just think, for example, how often are such sequences used for instructional purposes).</div><div class=""><br class=""></div><div class="">One other possibility is to introduce open-ended, infinite sequences defined by a single bound and a stride:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><div class="" style="margin: 0px; line-height: normal; color: rgb(203, 203, 203);"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>// infinite sequence, starting with 5 and advancing by -2</div></div><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>(<span class="" style="color: rgb(255, 38, 0);">5</span>..|-<span class="" style="color: rgb(255, 38, 0);">2</span>)</div></div><div class=""><br class=""></div><div class="">… which could be optionally closed by one of the interval operators:</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Source Code Pro';"><span class="" style="color: rgb(200, 172, 229);">&nbsp; &nbsp;</span><span class="" style="color: rgb(200, 172, 229);">&nbsp;</span>(<span class="" style="color: rgb(255, 38, 0);">5</span>..|-<span class="" style="color: rgb(255, 38, 0);">2</span>)...<span class="" style="color: rgb(255, 38, 0);">1</span></div></div><div class=""><br class=""></div><div class="">I’ve read somewhere that the “interval is going away”, in which case, a new tertiary operator may be worth considering since striding is such a fundamental operation. Or really any of the above – just not sticking to the existing `<span class="" style="color: rgb(145, 84, 15); font-family: 'Source Code Pro'; font-size: 12px;">stride</span>` methods!</div><div class=""><br class=""></div><div class="">milos</div></body></html>