Re: Range Expressions

+1 for "step"

On Mon, Nov 30, 2020 at 6:07 AM Dave Pawson <dave.pawson@gmail.com> wrote:

> 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.
>
>

-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

Received on Monday, 30 November 2020 15:33:36 UTC