caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: asmadeus77@gmail.com
To: "Ben Aurel" <ben.aurel@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] newbie: how to call a function with multiple parameters?
Date: Tue, 5 Aug 2008 13:40:21 +0200	[thread overview]
Message-ID: <b79ece760808050440j780f71ddje74f5c7fb70923be@mail.gmail.com> (raw)
In-Reply-To: <74a4f4670808041132p757cb91aofd8d0d826dd081b4@mail.gmail.com>

Hello,
semicolons are separator inside sentences, that is, just like in C
(you've had theses right)
double semicolons are to tell the compiler you're ending a sentence;
theses can be ommited when there is no ambiguity in the syntax, that
is when there is another "main" let after it. Here, you need them on
line 4.

As for arguments, ocaml works by passing one argument, then gives back
another function, then takes another argument, returns another
function, etc... If you wanted to have a tuple, you'd define the
function with "let print_logic (a, b) ="
Here, since you've defined it with "a b", you need to call it with a
THEN with b. That is : "print_logic true false"

Hope this helps,
Asmadeus


  reply	other threads:[~2008-08-05 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 18:32 Ben Aurel
2008-08-05 11:40 ` asmadeus77 [this message]
2008-08-05 11:46 ` [Caml-list] " micha
2008-08-05 13:26 ` Peng Zang

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=b79ece760808050440j780f71ddje74f5c7fb70923be@mail.gmail.com \
    --to=asmadeus77@gmail.com \
    --cc=ben.aurel@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).