[
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: | 2010-11-12 (05:57) |
From: | Elnatan Reisner <elnatan@c...> |
Subject: | Pervasives.compare != Pervasives.compare |
I was surprised when I noticed the following behavior: Objective Caml version 3.11.2 # compare == compare;; - : bool = false # let f = compare;; val f : 'a -> 'a -> int = <fun> # f == compare;; - : bool = false # f == f;; - : bool = true # let g = compare;; val g : 'a -> 'a -> int = <fun> # f == g;; - : bool = false Playing around a bit more, I seemed to find that every time you access an 'external' function, you get a distinct reference (is there a better term?) to it. This seems a bit odd to me. Can someone explain? Thanks, Elnatan