Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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,
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: