interval-foldl and interval-foldr Bradley Lucier (17 Aug 2022 15:45 UTC)
Re: interval-foldl and interval-foldr John Cowan (17 Aug 2022 21:11 UTC)
Re: interval-foldl and interval-foldr Marc Nieper-Wißkirchen (17 Aug 2022 21:29 UTC)
Re: interval-foldl and interval-foldr Bradley Lucier (17 Aug 2022 21:34 UTC)

interval-foldl and interval-foldr Bradley Lucier 17 Aug 2022 15:45 UTC

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