On 26/04/07, skaller <skaller@users.sourceforge.net> wrote:
It knows the type of the function expression, and that is all
that is required. Incidentally Ocaml evaluates right to left. So
f x y z
will be roughly:
push (eval z)
push (eval y)
push (eval x)
push (eval f)
apply
apply
apply
But that doesn't explain how does each apply know what to do, either to build a new closure (in the case above, the first two applies) or to actually call the code (the third apply).
- Tom