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 WAA14010; Mon, 9 Dec 2002 22:17:12 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA30342 for caml-list@pauillac.inria.fr; Mon, 9 Dec 2002 22:16:04 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA02261 for ; Mon, 9 Dec 2002 14:45:11 +0100 (MET) Received: from beaune.inria.fr (beaune.inria.fr [128.93.8.3]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gB9DjBX25438 for ; Mon, 9 Dec 2002 14:45:11 +0100 (MET) Received: from beaune.inria.fr by beaune.inria.fr (8.8.8/1.1.22.3/14Sep99-0328PM) id OAA0000006403; Mon, 9 Dec 2002 14:45:10 +0100 (MET) Message-ID: <3DF49E66.9A7528A2@beaune.inria.fr> Date: Mon, 09 Dec 2002 14:45:10 +0100 From: Didier Le Botlan Organization: INRIA (Projet CRISTAL) X-Mailer: Mozilla 4.75 [fr] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: onlyclimb CC: caml-list@inria.fr Subject: Re: [Caml-list] How to throw away oop? References: <3DF50918.7040704@163.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk May be this solution is not suitable to your problem, however I notice that you do not use parameterized constructors (nor parameterized classes). This is very common in ocaml, though. You talk about Sequences. Fine. Sequences are lists (or whatever structure you want). A sequence of amino-acids is of type amino-acid list and a sequence of dna-bases is of type dna list. Any function that operates polymorphically on lists (that is, on any 'a list) will operate as well on dna lists and amino-acids lists. If you want to get the length of these sequences, you can use List.length. If you think that lists are not adequate for your problem, you are free to write your own structure of type 'a sequence. ------------------- 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