Clarifications for numeric-range
Wolfgang Corcoran-Mathe 29 Aug 2020 17:14 UTC
I've pushed a change to the specification of numeric-range which (I
think) correctly describes the values contained in the range returned,
at least when <step> is non-zero:
> This range produces the sequence
>
> start, (+ start step), (+ start (* 2 step)), …, (+ start (* n step)),
>
> where n is the greatest integer such that (+ start (* n step)) < end
> if step is positive, or such that (+ start (* n step)) > end if step
> is negative.
This is somewhat wordy, but, I think, superior to merely describing the
range's indexer (as in draft #4).
It remains to be determined: Is a range with a zero step an infinite
sequence of the <start> parameter, is it an error to create such a
range, or what?
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"It from bit." --John Wheeler