From: John Whitley <whitley@cse.buffalo.edu>
Date: Wed, 9 Dec 1998 22:21:21 -0500 (EST)
To: caml-list@inria.fr
Subject: for loops with stride
Thanks to everyone who responded to my earlier question re:
composition. Quite enlightening discussion... 8-)
On a hopefully less controversial note, I'd like to make a suggestion
for an addition to OCaml for-loops. Consider an optional stride
parameter, as in:
for i = 0 to n-1 by stride do
...
done
At least in certain signal processing code that I'm working with
presently, the above is a common (and highly convenient) pattern. The
corresponding while loop is simply not as easy to write or understand.
Thanks,
John
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:17 MET