From: Michael Welsh Duggan <md5i@cs.cmu.edu>
To: caml-list@inria.fr
Subject: Recursive Sets?
Date: 02 Aug 2000 14:34:59 -0400 [thread overview]
Message-ID: <v1tbszbfr58.fsf_-_@takayama.mt.cs.cmu.edu> (raw)
In-Reply-To: Alan Schmitt's message of "Tue, 25 Jul 2000 07:26:20 +0200"
I have been trying to create a recursive type which can express sets
of itself. The following code is not meant to be correct (it isn't),
but hopefully expresses the sort of thing I want to do. Can someone
throw some ideas at me?
type foo =
| A | B
| Set of FooSet.t
module OrderedFoos =
struct
type t = foo
let compare (a:t) (b:t) = compare a b
end
module FooSet = Set.Make(OrderedFoos)
--
Michael Duggan
(md5i@cs.cmu.edu)
next reply other threads:[~2000-08-03 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-02 18:34 Michael Welsh Duggan [this message]
2000-08-03 13:55 ` Markus Mottl
2000-08-09 0:25 ` Jean-Christophe Filliatre
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=v1tbszbfr58.fsf_-_@takayama.mt.cs.cmu.edu \
--to=md5i@cs.cmu.edu \
--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