From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_POST, NO_REAL_NAME,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6AF89BBAF for ; Tue, 5 Aug 2008 13:40:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcBAHjYl0hA6aaxk2dsb2JhbACQTC4+AQEBAQkDCAkRA5ZghVo X-IronPort-AV: E=Sophos;i="4.31,310,1215381600"; d="scan'208";a="15819939" Received: from py-out-1112.google.com ([64.233.166.177]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Aug 2008 13:40:22 +0200 Received: by py-out-1112.google.com with SMTP id a77so1144703pyh.33 for ; Tue, 05 Aug 2008 04:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=41V4EC65wDL723w+zzjMpk+ZLg6vyyWANhuDrfO/AQc=; b=BRJbtNDoQ5hRKTIW2GuAExv5pAntBXTdGzFjJyz+0MHSEPXB0klVKgWzP/XG0Bknhu mVaT89qtvMf2DenX6e828YF7C67GtstauSNSYDCqWCSp+He8f6jie8yTjT0AEXIdBQuc NJvwRZk8glj1l5gy658okvV4ixWUUmMimCmpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=MbsmpYtbfkmGQIK54Ii+tKa/uakFqMoDuiNV0w3PQfE4AhK4PZAMLbfYPDPWCicap1 GpcRb+n+4XUX32dCg0WfDhBJt2M7Rhlva+hxUfnBHh2fCa92HbyKIlXnLiRKjMlCMyVJ spL9PHF34V8i3aKHAiXLKiJGVq/vzlUuHszF0= Received: by 10.65.254.5 with SMTP id g5mr693868qbs.67.1217936421326; Tue, 05 Aug 2008 04:40:21 -0700 (PDT) Received: by 10.65.93.4 with HTTP; Tue, 5 Aug 2008 04:40:21 -0700 (PDT) Message-ID: Date: Tue, 5 Aug 2008 13:40:21 +0200 From: asmadeus77@gmail.com To: "Ben Aurel" Subject: Re: [Caml-list] newbie: how to call a function with multiple parameters? Cc: caml-list@yquem.inria.fr In-Reply-To: <74a4f4670808041132p757cb91aofd8d0d826dd081b4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <74a4f4670808041132p757cb91aofd8d0d826dd081b4@mail.gmail.com> X-Spam: no; 0.00; semicolons:01 semicolons:01 compiler:01 syntax:01 ocaml:01 caml-list:01 tuple:02 define:02 argument:02 argument:02 newbie:02 defined:02 parameters:03 let:03 let:03 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