From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA32334; Sat, 29 Mar 2003 10:15:50 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA00670 for ; Sat, 29 Mar 2003 10:15:49 +0100 (MET) Received: from kraid.nerim.net (smtp-102.nerim.net [62.4.16.102]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2T9FmX13384 for ; Sat, 29 Mar 2003 10:15:48 +0100 (MET) Received: from hector.lesours (lesours.starynkevitch.net [80.65.224.217]) by kraid.nerim.net (Postfix) with ESMTP id F1AA94102B; Sat, 29 Mar 2003 10:15:47 +0100 (CET) Received: from basile by hector.lesours with local (Exim 3.36 #1 (Debian)) id 18zCRH-00085x-00; Sat, 29 Mar 2003 10:15:47 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <16005.25667.709552.511315@hector.lesours> Date: Sat, 29 Mar 2003 10:15:47 +0100 To: , Cc: caml-list@inria.fr Subject: [Caml-list] newbie questions In-Reply-To: <20030329084839.BAF874C99@sitemail.everyone.net> References: <20030329084839.BAF874C99@sitemail.everyone.net> X-Mailer: VM 7.13 under Emacs 21.2.2 From: Basile STARYNKEVITCH X-Spam: no; 0.00; basile:01 caml-list:01 newbie:01 neophyte:01 recursion:01 recursions:01 faiencerie:01 92340:01 reine:01 nerim:01 htmlman:01 tunes:01 bindings:01 ocaml:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "Ruediger" == Dr Ruediger M Flaig writes: Ruediger> Good morning to all you bedouins out there :-) , as I am Ruediger> a neophyte to CAML, forgive me if my questions have been Ruediger> asked (and answered) a hundred times before... You might have checked in the mailing list archive before asking... Ruediger> 1.: Is there any means of doing list-type pattern Ruediger> matching (style "| h::t -> ...") for recursion on Ruediger> strings? [...] unfortunately no. You cannot have pattern matching on strings. But the Str module might help (it provides regular expressions). See also recent postings on this issue: http://caml.inria.fr/archives/200303/msg00289.html http://caml.inria.fr/archives/200303/msg00399.html Ruediger> 2.: A question on language design: why do recursive Ruediger> functions have to be marked explicitly as such? [...] Any (syntactically non-recursive) *expression* can appear on the right hand side of let bindings, but this is not true for let rec bindings which are restriced (syntactically) to functions and constant constructors see http://caml.inria.fr/ocaml/htmlman/manual015.html for more (Historical note; many other languages require syntactic marking of recursions: Scheme, Fortran90, PL1, ...) -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet aliases: basiletunesorg = bstarynknerimnet 8, rue de la Faïencerie, 92340 Bourg La Reine, France ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners