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
value restriction
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-01-01 (23:05)
From: Jacques Le Normand <rathereasy@g...>
Subject: value restriction
Hello caml-list,
with respect to the value restriction, what exactly constitutes a value?
the textbook definition doesn't seem to hold, since the following
generalizes:

let f = let x = 1 in fun g h x -> g (h x);;

while this won't:

let f () = let x = (fun x -> x) (fun x -> x) in fun g h x -> g (h x);;

cheers

--Jacques L.