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
Re: unwind-protect?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-11-19 (14:51)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: unwind-protect?
>From: Pierre Weis <Pierre.Weis@inria.fr>

>Here, polymorphism, curryfication, and specialization are shining,
>since you juste have to add one in_* functional application before an
>actual call to any function f to obtain a specialized evaluation
>context for f. For instance:

>let in_tmp f arg = in_directory "/tmp" f arg;;

Actually, currying gets in the way in this case (as it often does).
If f takes two arguments, then "in_tmp f x y" will not work as
expected, but the type-checker will not find the error.

-- Damien