[Prev][Next][Index][Thread]

Re: small Q



Thant Tessman <thant@acm.org> writes:

> SML functions take only one value and return only one value. It just so
> happens that these values can be tuples. This is the Right Way (TM) to
> do it.

Yes, although there is another good way of having multiple parameters
for an ML function: currying.  A curried function that looks like it
has N parameters is actually a one-parameter function that returns a
function with N-1 parameters.  Which is very cool.

    Andy
-- 
Andy Smith                                             ams70@cam.ac.uk
St John's College, Cambridge, CB2 1TP, UK               (07989) 453208



References: