Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Why no 'step' in for loops?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: MikhailFedotov <mikhail@k...>
Subject: RE: [Caml-list] Why no 'step' in for loops?
Hi!

> Am I missing something?
>
> for i = 0 to 100 step 10 ...
>
> I know I can emulate it my having another let-binding inside
> the loop, but that's just ugly and hard to debug.

If your worries are about uglyness, then tail-recursive functions
are more expressive.

Mikhail


-------------------
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