Browse thread
Re: [Caml-list] Comparison of functional values
- Arturo Borquez
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Arturo Borquez <aborquez@a...> |
| Subject: | Re: [Caml-list] Comparison of functional values |
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