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
[Caml-list] Breaking out of iterative loops
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-02 (00:57)
From: John Max Skaller <skaller@o...>
Subject: Re: [Caml-list] Breaking out of iterative loops
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.
>  for ... do
>    raise End_Loop
>  done
>with End_Loop ->
>But please, for my soul sake, avoid such things unless you do really need an 
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.

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