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 CAA25050; Thu, 2 May 2002 02:57:15 +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 CAA25046 for ; Thu, 2 May 2002 02:57:14 +0200 (MET DST) Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.25.148.40]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g420vCD24672 for ; Thu, 2 May 2002 02:57:13 +0200 (MET DST) Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id g420v9Xt019848; Thu, 2 May 2002 10:57:10 +1000 (EST) Received: from ozemail.com.au (ppp139.dyn71.pacific.net.au [202.7.71.139]) by wisma.pacific.net.au with ESMTP id KAA15718; Thu, 2 May 2002 10:57:08 +1000 (EST) Message-ID: <3CD08EE3.9010202@ozemail.com.au> Date: Thu, 02 May 2002 10:57:07 +1000 From: John Max Skaller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901 X-Accept-Language: en-us MIME-Version: 1.0 To: Johan =?ISO-8859-1?Q?Balti=E9?= CC: OCaml Mailing list Subject: Re: [Caml-list] Breaking out of iterative loops References: <20020430202706.GA6791@vincent> <200204302331.32905.johan.baltie@wanadoo.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Johan Baltié wrote: > >Think you should look for exception handling. >I do not use anything that looks like a "continue" and "break" as i generally >avoid loop in my code and i do not think there is any. > >break: >try > for ... do > raise End_Loop > done >with End_Loop -> > > >But please, for my soul sake, avoid such things unless you do really need an >exception > the particular example that bugs me the most is this one: List.fold_left (&&) true (List.map2 pred a b) What is the input data were infinite? Hmmm .. in an eager language, the usual functional decomposition is useless. CPS is looking better every day :-) -- John Max Skaller, mailto:skaller@ozemail.com.au snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 ------------------- 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