Curried Functions
All,
I get the sense that curried functions (that is, functions with > 1
argument, not declared in a tuple) can be extremely useful for partial
computations. For example, as in the Paulson book,
fun infixApply x f y = f (x, y);
val reciprocal = infixApply 1.0 op/;
reciprocal 2.0;
-> val it = 0.5 : real
The infixApply function actually can help define a whole set of
functions. But I'd like to see something more powerful that can be done
with curried functions.
Does anyone have any killer example?
-Denis
|