Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] How to throw away oop?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Didier Le Botlan <lebotlan@b...>
Subject: Re: [Caml-list] How to throw away oop?
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

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 Archives:
Bug reports: FAQ:
Beginner's list: