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=1.3 required=5.0 tests=AWL,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_SORBS_WEB autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id D5F38BBAF for ; Wed, 6 Aug 2008 20:37:51 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugAAGeMmUjC2fJWomdsb2JhbACJGogdAQEBAQEBBwUGCRGcTA X-IronPort-AV: E=Sophos;i="4.31,315,1215381600"; d="scan'208";a="13767888" Received: from anchor-post-36.mail.demon.net ([194.217.242.86]) by mail2-smtp-roc.national.inria.fr with ESMTP; 06 Aug 2008 20:37:51 +0200 Received: from orion.metastack.com ([80.177.38.218]) by anchor-post-36.mail.demon.net with esmtp (Exim 4.67) id 1KQntO-0006ZB-MI for caml-list@yquem.inria.fr; Wed, 06 Aug 2008 18:37:51 +0000 Received: from orion.metastack.com (IDENT:25@localhost [127.0.0.1]) by orion.metastack.com (8.13.4/8.13.3) with ESMTP id m76IJOtF023135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 6 Aug 2008 19:20:03 +0100 Received: (from defang@localhost) by orion.metastack.com (8.13.4/8.13.3/Submit) id m76IIUTe023132 for ; Wed, 6 Aug 2008 19:18:30 +0100 X-Authentication-Warning: orion.metastack.com: defang set sender to using -f Received: from countertenor ([149.254.192.192]) by orion.metastack.com (envelope-sender ) (MIMEDefang) with ESMTP id m76IHRHs023124; Wed, 06 Aug 2008 19:18:30 +0100 (BST) From: "David Allsopp" To: "'Ashish Agarwal'" , "'Ben Aurel'" Cc: References: <74a4f4670808060708n5102e6e6q57047077fff0fb85@mail.gmail.com> Subject: RE: [Caml-list] how to print (or cast) an integer Date: Wed, 6 Aug 2008 19:34:59 +0100 Organization: MetaStack Solutions Ltd. Message-ID: <224EBB28F6FD486C85129EB4B644EAEE@countertenor> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acj3z5Yuc68EL/fYRKiqSX/ZDsTT0wAIkHcQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 In-Reply-To: X-Scanned-By: MIMEDefang 2.63 on 80.177.38.218 X-Spam: no; 0.00; recursive:01 recursive:01 shorthand:98 rec:01 integer:01 caml-list:01 defined:02 variables:02 let:03 let:03 nested:04 scheme:05 somewhat:05 indent:06 style:93 > Also note you do not need "and". That is only required when the variables > being defined are mutually recursive. It would be better style to write: > > let x = 1;; > let y = 2;; The style aspect of your comment is a definite matter of opinion![*] Given that this is a beginner question, it's probably worth clarifying that in the context of "let .. and .. ;;" or "let .. and .. in ..;;" the "and" is a shorthand allowing you to group multiple lets together without introducing a new environment. "and" only provides mutually recursive definitions in a "let rec" statement. David [*] I personally find it neater to group a series of definitions at the same level using "let .. and .. in" and only use let again for nested definitions but that's because I indent code after an "in" but I think that my indenting scheme is somewhat less common...