English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Physical compare
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-23 (19:20)
From: Tom Hawkins <tom@c...>
Subject: Physical compare
Is their a version of "compare" that is based on physical equality?  If 
not, how can I define one?  I tried:

let compareq a b = if a == b then 0 else if a > b then 1 else (-1)

But unfortunately, (>) is a structural comparison.

I need to make a Map where the keys are distinguished by the physical