caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Why no 'step' in for loops?
@ 2003-06-04 12:35 Richard Jones
  2003-06-04 12:58 ` MikhailFedotov
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Jones @ 2003-06-04 12:35 UTC (permalink / raw)
  To: caml-list


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.

Rich.

-- 
Richard Jones, Red Hat Inc. (London) and Merjis Ltd. http://www.merjis.com/
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj
MONOLITH is an advanced framework for writing web applications in C, easier
than using Perl & Java, much faster and smaller, reusable widget-based arch,
database-backed, discussion, chat, calendaring:
http://www.annexia.org/freeware/monolith/

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [Caml-list] Why no 'step' in for loops?
  2003-06-04 12:35 [Caml-list] Why no 'step' in for loops? Richard Jones
@ 2003-06-04 12:58 ` MikhailFedotov
  0 siblings, 0 replies; 2+ messages in thread
From: MikhailFedotov @ 2003-06-04 12:58 UTC (permalink / raw)
  To: 'Richard Jones', caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-04 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04 12:35 [Caml-list] Why no 'step' in for loops? Richard Jones
2003-06-04 12:58 ` MikhailFedotov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).