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
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs