caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Arturo Borquez <aborquez@altavista.com>
To: andrieu@oxygene.ijm.jussieu.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Comparison of functional values
Date: 6 Mar 2001 14:17:35 -0800	[thread overview]
Message-ID: <20010306221735.2527.cpmta@c012.sfo.cp.net> (raw)

On Tue, 06 March 2001, Olivier Andrieu wrote:

> 
> 
> Hello list, 
> 
> I wanted to build a Set of functional value. But generic equality
> can't be used for functional values (raises an exception ...). It is
> therefore difficult to build a Set of such values because the Set.Make
> functor requires a comparison function and Pervasives.compare relies
> on (=).
> 
> Is there a way around this ? I thought I could use physical equality
> (wich is OK wrt functional values) but there's no such thing as
> `physical inequality'.
> 
> -- 
> Olivier Andrieu
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr

Hi Olivier:
Perhaps this help

let a = fun f x -> x = x;;
let b = fun f x -> x = x;;
(a == b) = true;;
-: bool = false
not (a == b) = true;;
-: bool = true

Regards
Arturo Borquez


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


             reply	other threads:[~2001-03-06 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-06 22:17 Arturo Borquez [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-06 21:51 Olivier Andrieu
2001-03-07  5:20 ` Alan Schmitt
2001-03-06 22:08   ` Juergen Pfitzenmaier
2001-03-07  8:49     ` [Caml-list] Comparison of functional values Olivier Andrieu
2001-03-07  8:56       ` Xavier Leroy

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=20010306221735.2527.cpmta@c012.sfo.cp.net \
    --to=aborquez@altavista.com \
    --cc=andrieu@oxygene.ijm.jussieu.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;
as well as URLs for NNTP newsgroup(s).