I agree that these foldl and foldr procedures make sense.

I am a little troubled (I forget if I mentioned this before) by the use of the word "interval" in this connection, as it conflicts with intervals as in interval arithmetic.  An interval in that sense is everything that falls between an upper bound and a lower bound, inclusive or exclusive, but does not have to have denumerable members, much less integer ones.  Can anyone think of an alternative, or is it too late?

On Wed, Aug 17, 2022 at 11:46 AM Bradley Lucier <xxxxxx@math.purdue.edu> wrote:
The library has long had %%interval-foldl as an internal routine.

After the recent rewrite, %%interval-foldl was used to implement
array-foldl, array-reduce, array-for-each, and interval-for-each, and a
new %%interval-foldr was written to support array-foldr.

After seeing how useful %%interval-foldl and %%interval-foldr proved to
be in processing data in order over intervals and arrays, I decided to
publicize these routines as interval-foldl and interval-foldr.

It's not quite parallel to the for/* syntax that Racket has for loops,
but it can be used quite similarly.

Brad