Iota
Steven Schveighoffer
schveiguy at gmail.com
Fri Aug 5 15:19:53 UTC 2022
On 8/4/22 8:12 PM, Steven Schveighoffer wrote:
> On 8/4/22 3:06 PM, H. S. Teoh wrote:
>> For example, if you want a range that starts from 10 and ends at 20,
>> just write:
>>
>> iota(10).map!(i => i + 10)
>>
>> If you want a range that starts at 3 and steps by 5 each time, just
>> write:
>>
>> iota(n).map!(i => 3 + i*5)
For some reason, the forum.dlang.org software regarded the paragraph
below as belonging to Teoh. It was something I wrote.
> Sorry, I'd rather specify the start, end, and steps, then have to work
> backwards from the formula what it means. Clarity is important.
>
-Steve
More information about the Digitalmars-d
mailing list