[MLton-user] Re: [polyml] Order of evaluation of arguments to a
function
David Matthews
David.Matthews at prolingua.co.uk
Thu Aug 18 09:50:22 PDT 2011
On 18/08/2011 17:02, Alex Merry wrote:
> On 18/08/11 16:08, Ramana Kumar wrote:
>> what about evaluating f?
> So the order of evaluation of (f x y) is
> f
> x
> (f x)
> y
> ((f x) y)
>
> This seems like a natural evaluation order for an eager functional
> language.
I have always understood that the Definition of Standard ML (rule 100)
requires this order. The syntax of an application is
exp ::= atexp
exp atexp
...
and the semantics first evaluates the exp to b, then the atexp to v and
then applies b to v.
David
More information about the MLton-user
mailing list