number ranges

forkit forkit at gmail.com
Tue Jan 18 20:43:08 UTC 2022


On Tuesday, 18 January 2022 at 16:02:42 UTC, Tejas wrote:
>
> Newer languages nowadays use `start..<end` to denote the 
> intent, think it's something we should follow?

I've decided to avoid using number ranges 'directly', and instead 
use a wrapper function...


auto range(T:T)(T a, T b)
{
     import std.range : iota;
     return iota(a, (b+1));
}




More information about the Digitalmars-d-learn mailing list