Re: The One-Letter Nested Function - a sample article for some kindof D gems website

2012-02-13 Thread Daniel Murphy
Andrej Mitrovic andrej.mitrov...@gmail.com wrote in message news:mailman.283.1329140648.20196.digitalmar...@puremagic.com... The only problem is I can't seem to make it static: static u = (int a, int b) = cast(ubyte)uniform(a, b); auto u = function (int a, int b) = cast(ubyte)uniform(a, b);

Re: The One-Letter Nested Function - a sample article for some kindof D gems website

2012-02-13 Thread David Nadlinger
On 2/13/12 5:17 PM, Daniel Murphy wrote: Andrej Mitrovicandrej.mitrov...@gmail.com wrote in message news:mailman.283.1329140648.20196.digitalmar...@puremagic.com... The only problem is I can't seem to make it static: static u = (int a, int b) = cast(ubyte)uniform(a, b); auto u = function

Re: The One-Letter Nested Function - a sample article for some kindof D gems website

2012-02-13 Thread Daniel Murphy
David Nadlinger s...@klickverbot.at wrote in message news:jhbdnb$21sb$1...@digitalmars.com... auto u = function (int a, int b) = cast(ubyte)uniform(a, b); Should do it. I know it currently isn't, but shouldn't this be inferred as per TDPL anyway? David Yes, it's just a way to force