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 QAA29716; Fri, 29 Nov 2002 16:30:31 +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 QAA29952 for ; Fri, 29 Nov 2002 16:30:30 +0100 (MET) Received: from julie.univ-savoie.fr (univax.univ-savoie.fr [193.48.120.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gATFUU124832 for ; Fri, 29 Nov 2002 16:30:30 +0100 (MET) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by julie.univ-savoie.fr (8.9.3/jtpda-5.3.3) with ESMTP id QAA23299 ; Fri, 29 Nov 2002 16:30:25 +0100 (CET) Received: from univ-savoie.fr (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id gATFULE2017241 ; Fri, 29 Nov 2002 16:30:21 +0100 Message-ID: <3DE78822.7020304@univ-savoie.fr> Date: Fri, 29 Nov 2002 16:30:42 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "altavillasalvatore@libero.it" CC: caml-list Subject: Re: [Caml-list] small exercise References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk altavillasalvatore@libero.it wrote: > Hi all, > > I do not succeed to develop the following exercise: > I have need of your aid. > > > > input: string "1.15.120.13.43.35.340.190.0" > > output: int array= [| 1; 15; 120; 13; 43; 35; 340; 190; 0; |] > > : string -> int array > > > Regards. I hope you are not a student trying to have his home work done by this mailing list ? Just a hint look at the documentation of the following functions: module | function ------------------------------ str | split list | map pervasives | int_of_string array | of_list The answer fits on one (long) line. -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI ------------------- 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