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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 09AA4BBAF for ; Wed, 3 Sep 2008 19:24:44 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApkAABRlvkjBvsFKnWdsb2JhbACSUQEBAQEBCA0HpDWBZw X-IronPort-AV: E=Sophos;i="4.32,320,1217800800"; d="scan'208";a="28777562" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Sep 2008 19:24:43 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m83HOh5U002440 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 3 Sep 2008 19:24:43 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApkAABRlvkjBvsFKnWdsb2JhbACSUQEBAQEBCA0HpDWBZw X-IronPort-AV: E=Sophos;i="4.32,320,1217800800"; d="scan'208";a="28777561" Received: from dnsp.umh.ac.be (HELO hermes1.umh.ac.be) ([193.190.193.74]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Sep 2008 19:24:42 +0200 Received: from poincare.swapping.umh.ac.be (mathwifi1.swapping.umh.ac.be [10.102.100.203]) by hermes1.umh.ac.be (8.14.2/8.13.6) with ESMTP id m83HL0VT761998; Wed, 3 Sep 2008 19:21:00 +0200 Received: from localhost ([127.0.0.1] ident=trch) by poincare.swapping.umh.ac.be with esmtp (Exim 4.69) (envelope-from ) id 1Kaw5w-0005If-Sx; Wed, 03 Sep 2008 19:24:40 +0200 Date: Wed, 03 Sep 2008 19:24:40 +0200 (CEST) Message-Id: <20080903.192440.782875784647892171.Christophe.Troestler+ocaml@umh.ac.be> To: circularfunc@gmail.com Cc: OCaml Mailing List Subject: Re: [Caml-list] is there a switch or cond-statement? nested functions? From: Christophe TROESTLER In-Reply-To: References: X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoLKJBq0JBY9:}8v|j Organization: University of Mons-Hainaut X-Mailer: Mew version 6.0.51 on Emacs 22.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 193.190.193.76 X-Miltered: at discorde with ID 48BEC85B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 troestler:01 christophe:01 troestler:01 ocaml:01 0200,:01 oreilly-book:01 beginner's:01 ocaml:01 chap:98 beginners:01 wrote:01 rewrite:01 caml-list:01 functions:01 On Wed, 3 Sep 2008 19:08:33 +0200, circ ular wrote: > > thanks, the type problem is solved. but is there a way to write nested > functions? so the powerf isn't exposed outwards... > > and how can I rewrite the if statements in a case or cond way? pattern > mathcing is only on types right? cond a la scheme would be nice. > (...) May I suggest 1. You read http://www.ocaml-tutorial.org/ and at least chap 1-4 of http://caml.inria.fr/pub/docs/oreilly-book/html/index.html That will clear up most of your questions. 2. You direct subsequent questions to the beginner's list http://groups.yahoo.com/group/ocaml_beginners where you will receive proper help for your concerns. Thanks, C.