From: "Vincent Barichard <Vincent Barichard" <Vincent.Barichard@info.univ-angers.fr>
To: caml-list@pauillac.inria.fr
Subject: [Caml-list] Polymorphic Set
Date: Wed, 19 Dec 2001 20:08:10 +0100 [thread overview]
Message-ID: <15392.58778.897378.738285@helios.info-ua> (raw)
Hi,
Is there a way in OCAML to create polymorphic Set (as for List) ?
I've tried the following code, but ocaml don't like.
module MySet = Set.Make (struct
type t = ('a * float)
let compare = function (_, valx) -> function (_, valy) ->
if valx < valy then 1
else if valx > valy then -1
else 0
end)
Anybody has an idea on how to do ?
Thanks for your help,
Vincent
--
Vincent Barichard
Métaheuristiques et Optimisation Combinatoire
Faculté des Sciences d'Angers
Tel : 02 41 73 52 06
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2001-12-19 19:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-19 19:08 Vincent Barichard <Vincent Barichard [this message]
2001-12-19 19:47 ` Brian Rogoff
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=15392.58778.897378.738285@helios.info-ua \
--to=vincent.barichard@info.univ-angers.fr \
--cc=caml-list@pauillac.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