From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA09746; Thu, 31 Jul 2003 02:47:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA06982 for ; Thu, 31 Jul 2003 02:47:07 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h6V0l4T07600; Thu, 31 Jul 2003 02:47:05 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2/3.7W) with ESMTP id JAA11753; Thu, 31 Jul 2003 09:47:01 +0900 (JST) To: Didier.Remy@inria.fr Cc: yminsky@cs.cornell.edu, caml-list@inria.fr Subject: Re: [Caml-list] unwind-protect In-Reply-To: <20030730192905.A8578@morgon.inria.fr> References: <3F275B5A.3010301@cs.caltech.edu> <1059561019.25904.1468.camel@dragonfly.localdomain> <20030730192905.A8578@morgon.inria.fr> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030731094700B.garrigue@kurims.kyoto-u.ac.jp> Date: Thu, 31 Jul 2003 09:47:00 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; jacques:01 caml-list:01 garrigue:01 unit:03 heap:03 allocate:03 let:04 raise:05 res:06 kurims:06 kyoto-u:09 doesn't:12 yet:12 try:19 version:21 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Yet another version which doesn't allocate anything in the heap: let protect ~f ~(finally: unit -> unit) = let res = try f () with e -> finally (); raise e in finally (); res Jacques Garrigue ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners