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 IAA25665; Thu, 26 Apr 2001 08:04:43 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA25594 for ; Thu, 26 Apr 2001 08:04:42 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f3Q64e512859 for ; Thu, 26 Apr 2001 08:04:41 +0200 (MET DST) Received: from pc8-118 (jcourant@pc8-118 [129.175.8.118]) by lri.lri.fr (8.11.1/jtpda-5.3.2) with SMTP id f3Q64F406584 ; Thu, 26 Apr 2001 08:04:15 +0200 (MET DST) Date: Thu, 26 Apr 2001 08:04:15 +0200 From: Judicaël Courant To: Patrick M Doane Cc: checker@d6.com, caml-list@inria.fr Subject: Re: [Caml-list] two unrelated questions Message-Id: <20010426080415.63b4affc.Judicael.Courant@lri.fr> In-Reply-To: References: <200104252108.OAA02055@smtp2-cm.mail.eni.net> X-Mailer: Sylpheed version 0.4.62 (GTK+ 1.2.8; i686-pc-linux-gnu) Organization: LRI Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Wed, 25 Apr 2001 20:38:43 -0400 (EDT) Patrick M Doane wrote: > > One way to think about exceptions is to treat them simply as control flow > expressions. For example, the 'break' statement is used in C/C++ to > early-out of iteration constructs. This translates naturally to > exceptions: > > exception Break > try > List.iter (fun .. -> ... raise Break) l > with Break -> () > Actually there is already such a predefined exception in the core library of O'Caml. The doc says: ------------------------------------------------------------------- exception Exit This exception is not raised by any library function. It is provided for use in your programs. ------------------------------------------------------------------- Judicaël. -- Judicael.Courant@lri.fr, http://www.lri.fr/~jcourant/ (+33) (0)1 69 15 64 85 "Montre moi des morceaux de ton monde, et je te montrerai le mien" Tim, matricule #929, condamné à mort. http://rozenn.picard.free.fr/tim.html ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr