develooper Front page | perl.perl6.users | Postings from November 2021

Re: A nice touch

Thread Previous | Thread Next
From:
Ralph Mellor
Date:
November 1, 2021 02:39
Subject:
Re: A nice touch
Message ID:
CAPLR5SdjUE2Kw8An3md-aeAMKhRrtXd74woo+QnVBEMPf_Sd6w@mail.gmail.com
On Sun, Oct 31, 2021 at 6:10 PM Sean McAfee <eefacm@gmail.com> wrote:
>
> the main point of my message was about the R metaoperator and the associativity of the operator it creates.

OK. Fwiw this was something I didn't know, or had forgotten, and I
find it delightful.

The main point of *my* comment was that I didn't -- and still don't --
understand why the associativity switch is relevant to the result. I'd
appreciate you explaining that.

> the difference you mention is indeed exactly why .. works but ... doesn't.

What I was thinking was that `..` explains why it works, and I
couldn't see how associativity was relevant. I wondered how to best
convey that, and thought showing `...` as well would make that a bit
clearer.

Anyhow, as I said, why is associativity relevant to this working?

Or were you sharing three things -- first, the joy of discovering an
elegant golfing solution, second, that using an `R` with `..` is an
important case for the reasons you've demonstrated, and third, that
`R` reverses associativity, which is *another* way that `R` is a
nicely designed metaoperator, though this latter aspect is not
relevant to why it worked for the solution you came up with?

--
love, raiph

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About