Re: Range Expressions

1 to 10 step 2 (may be) more common / familiar?

regards

On Mon, 30 Nov 2020 at 14:05, Michael Kay <mike@saxonica.com> wrote:
>
> Someone, I forget who, gave feedback suggesting making "by" a binary operator so
>
> 1 to 10 by 2 means ((1 to 10) by 2) i.e. 1, 3, 5, 7, 9
> 1 to 10 by -1 gives 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
> ("A", "B", "C", "D") by 2 gives ("A", "C")
> ("A", "B", "C", "D") by -2 gives ("D", "B")
>
> I've adopted this suggestion in my latest draft.
>
> Michael Kay
> Saxonica



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.

Received on Monday, 30 November 2020 14:07:44 UTC