Re: Argument order for folds
Marc Nieper-WiÃkirchen 20 Aug 2020 20:12 UTC
Am Do., 20. Aug. 2020 um 21:49 Uhr schrieb Wolfgang Corcoran-Mathe
<xxxxxx@sigwinch.xyz>:
> I think the specification of the bitvector fold procedures needs
> elaboration. In particular, the order in which <kons> is applied
> to its arguments should be specified, since Scheme's folds disagree
> on this.
+1
The SRFI 43/133/160 order is actually the better one (compared to the
SRFI 1 order) because that part of the argument list that varies (in
length) should always come last (for example, to make it compatible
with the case-lambda, etc.). One could add procedures xfold and
xfold-right to the SRFI 1-interface with the "correct" argument order.
For clarity, as SRFI 1 calls the consing argument "kons", SRFI 178 may
call that argument "xkons" (compare cons vs xcons).