Re: Multiple ranges for range-fold, range-for-each, ...
Wolfgang Corcoran-Mathe 31 Aug 2020 16:34 UTC
On 2020-08-31 10:49 +0200, Marc Nieper-Wißkirchen wrote:
> I just noticed that "range-for-each", "range-fold", ... only take a
> single range argument. (*)
>
> [snip]
>
> For consistency and to increase the applicability of ranges, I,
> therefore, suggest allowing all these procedures to take more than one
> range argument.
Agreed, this is definitely conventional, and preferable. Here are
the procedures I've found that should take one or more range
arguments:
* range-for-each
* range-map
* range-fold
* range-fold-right
Let me know if I missed any. The range-FUNC->{list, vector} functions
could presumably take multiple ranges as well.
> Speaking of this, wouldn't range=? be a plausible addition as well?
Yes, if an extensional notion of range equality (i.e. converting all
range arguments to lists or vectors and comparing those) is acceptable.
range-append is also plausible, now.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"Searching for fulfillment in this compact subset of existence...
My life must have a convergent subsequence somewhere... out there..."
--Abstruse Goose