|
 |
Darren New wrote:
> Technically, I would think you could have a curried function in a
> language with named parameters pretty easily.
Yeah, I don't see why not. It's only a shortcut for creating a closure...
>>> Lambda expressions are darned convenient. I used them in my little
>>> FFT toy app:
>>>
>>> RealInput.Data = GenerateWave(x => cos((Math.Pi*2*x)/(DataLen-1)));
>>
>> They're also damned useful when you want to curry a function:
>> bar = foo (...my random lambda function that I only just here...)
>
> That's where they're used in C#.
I didn't think C# had curried functions like my example.
> This is how the mechanisms for
> querying SQL from C# work - you can write something like
> db.table["customers"].select(x => x.Name > "Henry")
> and the "select()" function takes the AST describing that condition,
> translates it to SQL, and sends it to the database.
Lisp would be proud.
Does this transformation happen at compile-time or runtime?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |