Range of random numbers

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Apr 23 10:56:48 PDT 2012


On 23/04/12 19:46, Joseph Rushton Wakeling wrote:
> On 23/04/12 18:56, bearophile wrote:
>> jerro:
>>
>>> return repeat(0).map!(_ => uniform(lower, upper))();
>>>
>
> Yes, this works nicely. Thanks very much!

Is this a new addition?  With GDC I get a compiler error:

   expression expected, not '>'

... suggesting => isn't supported.



More information about the Digitalmars-d-learn mailing list