Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Tom <tom.primozic@gmail.com>
To: skaller <skaller@users.sourceforge.net>
Cc: "Caml List" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Function application implementation
Date: Thu, 26 Apr 2007 10:52:12 +0200	[thread overview]
Message-ID: <c1490a380704260152h34df93e9p20decd2f13459bbe@mail.gmail.com> (raw)
In-Reply-To: <1177557207.8088.27.camel@rosella.wigram>

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1225 bytes --]

  reply	other threads:[~2007-04-26  8:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 22:38 Tom
2007-04-26  3:13 ` [Caml-list] " skaller
2007-04-26  8:52   ` Tom [this message]
2007-04-26  9:17     ` skaller
2007-04-26  9:25     ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1490a380704260152h34df93e9p20decd2f13459bbe@mail.gmail.com \
    --to=tom.primozic@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=skaller@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox