caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Frédéric Gava" <frederic.gava@wanadoo.fr>
To: <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] 'a Set?
Date: Wed, 26 Jan 2005 16:36:56 +0100	[thread overview]
Message-ID: <003d01c503bc$dea027a0$0100a8c0@mshome.net> (raw)
In-Reply-To: <200501260913.09018.jon@jdh30.plus.com>

Hi,

> Compared to a flat set of functions, the functor approach has the
advantage of
> enforcing a consistently used compare function.
Ok, I am agree.  It is just a remark about coherence of names of functions
and
interfaces of the modules in the stdlib. There is many ModuleName.S
interfaces. Have the same names for functions that have the same semantics
seems (to me) a good things. (for example, have a function cardinal  in the
module Map, even if we could implemented this with a fold; the cardinal
function of the Sets are could also be implemented with a fold)

>The same effect can be
> achieved with "elt = 'a" by writing a higher-order function which returns
a
> record containing the Set.* functions using the given function argument as
> the compare function. Something equivalent to this:
>
>   type 'a t = 'a list
>....
> Cheers,
> Jon.
Ok. I am also agree. But the complexity is the problem of this data
structure ;-)

Cheers,
Frédéric Gava



  reply	other threads:[~2005-01-26 15:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25 23:54 Mike Hamburg
2005-01-26  8:25 ` [Caml-list] " Jean-Christophe Filliatre
2005-01-26 10:13   ` Frédéric Gava
2005-01-26 11:04     ` Radu Grigore
2005-01-26 12:04       ` Jacques Garrigue
2005-01-26 16:00         ` Alex Baretta
2005-01-26 16:14           ` Jacques Carette
2005-01-26 21:09           ` Mike Hamburg
2005-01-29  9:55         ` Radu Grigore
2005-01-26  9:13 ` Jon Harrop
2005-01-26 15:36   ` Frédéric Gava [this message]
2005-01-26 16:06     ` Jon Harrop

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='003d01c503bc$dea027a0$0100a8c0@mshome.net' \
    --to=frederic.gava@wanadoo.fr \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).