using the full range of ubyte with iota
Dominikus Dittes Scherkl via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 25 04:25:33 PST 2015
On Sunday, 25 January 2015 at 10:42:51 UTC, bearophile wrote:
> Vlad Levenfeld:
>
>> What's this about !`[]` and std.range.uniform?? It's not in
>> the documentation.
>
> It's an enhancement I have proposed.
Hm. I had more something in mind like "paramCast" - a kind of big
scissors that cut everything a function is called with to the
size it can cope with, so replacing
map!fn
not with
map!(x => fn(cast(ParameterTypeTuple!fn[0])x)
but instead with
map!(paramCast!fn)
Because this is useful in more situations, e.g. in every place
where you know the values would fit into the parameter (and for a
single call would use a cast).
But so far I couldn't manage to make this work :-/
More information about the Digitalmars-d-learn
mailing list