From: Didier Le Botlan <lebotlan@beaune.inria.fr>
To: onlyclimb <onlyclimb@163.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] How to throw away oop?
Date: Mon, 09 Dec 2002 14:45:10 +0100 [thread overview]
Message-ID: <3DF49E66.9A7528A2@beaune.inria.fr> (raw)
In-Reply-To: <3DF50918.7040704@163.com>
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
next prev parent reply other threads:[~2002-12-09 21:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 21:20 onlyclimb
2002-12-09 13:45 ` Didier Le Botlan [this message]
2002-12-09 14:10 ` Olivier Andrieu
2002-12-09 18:43 ` brogoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DF49E66.9A7528A2@beaune.inria.fr \
--to=lebotlan@beaune.inria.fr \
--cc=caml-list@inria.fr \
--cc=onlyclimb@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox