From: Olivier Ricordeau <olivier.ricordeau@wanadoo.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] match on dynamic type
Date: Tue, 22 Jul 2003 18:26:55 +0200 [thread overview]
Message-ID: <3F1D65CF.5090406@wanadoo.fr> (raw)
In-Reply-To: <3F1D5DA6.7090602@wanadoo.fr>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Olivier Ricordeau wrote:
> Hi!
>
> I'd like to know how I can make a match on an object's dynamic type. Let
> a be an abstract class. Let b and c be two class which inherit from a.
> I'd like to write a method which looks like this:
>
> method foo (bar : a) =
> match "a's dynamic type" with
I meant:
match "bar's dynamic type" with
> b -> do_something()
> | c -> do_something_else()
- --
- -= *Olivier RICORDEAU* =- http://freefolks.org
< LibNN addict http://libnn.org >
lynx -source http://freefolks.org/key.asc | gpg --import
olivier.ricordeau@wanadoo.fr _Might the source be with you_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/HWXPDFRYKP6DJEwRAs9oAJ42L0dNszbpvs9GF8wLsIavyMciSwCfcgMe
R0ji03fHPE/Xt1hkymNRwdE=
=qXKi
-----END PGP SIGNATURE-----
-------------------
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:[~2003-07-22 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-22 15:52 Olivier Ricordeau
2003-07-22 16:26 ` Olivier Ricordeau [this message]
2003-07-22 17:45 ` Olivier Ricordeau
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=3F1D65CF.5090406@wanadoo.fr \
--to=olivier.ricordeau@wanadoo.fr \
--cc=caml-list@inria.fr \
/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