The best ever MSDN help page
-
That's exactly my reaction. I was thinking "hang on - this actually looks really good. Why is he dissing it". Then I turned off auto-sarcasm and it became clear.
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
Don't see where that greatly helps you, perhaps I'm missing a particular scenario as you can either pass another expression which converts to object (blewh) or you could just go and do composition with Func<T,..> No? If you want expression templates well, C# doesn't have them; they designed the tedium of C# compiler away with that signature :)
Basically it lets you make curried functions (functions with 1 free variable). So imagine you have foo(a,b). Now you can say bar(b) = foo(1,b). And call bar(x), and foo(1,x) gets executed.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4 out now (27 May 2008) -
Chris Maunder wrote:
Then I turned off auto-sarcasm
Yeah, it took me a minute to remember where the switch was.
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
I'm middle-aged. My switch atrophied and fell off years ago.
Software Zen:
delete this;
-
Chris Maunder wrote:
Then I turned off auto-sarcasm
Yeah, it took me a minute to remember where the switch was.
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
Maybe we should have a new rule for posting in the Lounge, as in all posts should be sarcastic?
Vincent www.pub-olympics.com
-
Maybe we should have a new rule for posting in the Lounge, as in all posts should be sarcastic?
Vincent www.pub-olympics.com
Vincent Curry wrote:
Maybe we should have a new rule for posting in the Lounge, as in all posts should be sarcastic?
That's an utterly brillant idea.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4.... -- El Corazon
-
That's exactly my reaction. I was thinking "hang on - this actually looks really good. Why is he dissing it". Then I turned off auto-sarcasm and it became clear.
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
Basically it lets you make curried functions (functions with 1 free variable). So imagine you have foo(a,b). Now you can say bar(b) = foo(1,b). And call bar(x), and foo(1,x) gets executed.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4 out now (27 May 2008)Not sure what you're trying to do with it again but I think people are doing that without explicit CreateDelegate (should be "new delegate" construct generated by compiler) or whatever it was along the shorthand lines of: public static Func< T, Func<U, Z>> Curry<T, U, Z>(Func<T, U, Z> fn) { return new Func<Func<T, U, Z>, Func<T, Func<U, Z>>>( f => x => y => f(x, y))(fn); } if that makes any sense. Probably not what you want but you can split it up and use extension methods. It doesn't look good to me, because it is pure C# unreadable :)
-
Not sure what you're trying to do with it again but I think people are doing that without explicit CreateDelegate (should be "new delegate" construct generated by compiler) or whatever it was along the shorthand lines of: public static Func< T, Func<U, Z>> Curry<T, U, Z>(Func<T, U, Z> fn) { return new Func<Func<T, U, Z>, Func<T, Func<U, Z>>>( f => x => y => f(x, y))(fn); } if that makes any sense. Probably not what you want but you can split it up and use extension methods. It doesn't look good to me, because it is pure C# unreadable :)
-
Vincent Curry wrote:
Maybe we should have a new rule for posting in the Lounge, as in all posts should be sarcastic?
That's an utterly brillant idea.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4.... -- El Corazon
dan neely wrote:
That's an utterly brillant idea.
OK was that sarcasm? :)
The only thing unpredictable about me is just how predictable I'm going to be.
-
leppie wrote:
I meant it as a compliment.
That's the part I didn't get. :) I've become so accustomed to the incredibly poor quality of documentation coming from MS these days that I just assumed it was a well deserved snarky commentary. Quality documentation from MSDN - who knew?
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
Wow! It's almost like a bigfoot sighting or UFO encounter (except this time we DIDN'T get probed)! You know, they are going to read these posts and IMMEDIATELY take down that page. Everyone, QUICK!!! Save that HTML to your local machine. That way we have proof!! hehehehe :laugh:
JamminJimE Microsoft Certified Application Developer
Why are we still calling it Common Sense when it's just not that common? -
I'm middle-aged. My switch atrophied and fell off years ago.
Software Zen:
delete this;
-
Yes, but the prosthetics are so ... unsatisfying.
Software Zen:
delete this;
-
Yes, but the prosthetics are so ... unsatisfying.
Software Zen:
delete this;
-
Basically it lets you make curried functions (functions with 1 free variable). So imagine you have foo(a,b). Now you can say bar(b) = foo(1,b). And call bar(x), and foo(1,x) gets executed.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4 out now (27 May 2008)<Homer_sound> Hmmm.... Curry... </Homer_sound>
Software Zen:
delete this;
-
dan neely wrote:
That's an utterly brillant idea.
OK was that sarcasm? :)
The only thing unpredictable about me is just how predictable I'm going to be.
you catch on quickly
-
you catch on quickly
I try :)
The only thing unpredictable about me is just how predictable I'm going to be.