how to do iota(0,256) with ubytes ? (cf need for iotaInclusive)

Nordlöw via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 12 04:02:17 PDT 2015


On Monday, 12 October 2015 at 08:38:39 UTC, Per Nordlöw wrote:
> I would suggest to turn this pattern into a new algorithm 
> typically called
>
>     iotaOf(T, B, E)(B begin, E end);
>
> called as
>
>     iotaOf!ubyte(0,256)
>
> and use `std.conv.to` instead.

Here's a solution:

https://github.com/nordlow/justd/blob/a8b733034b049dc2abeabaa37332e503f39e9066/range_ex.d#L434


More information about the Digitalmars-d mailing list