On Wed, 30 Oct 2002, John Williams wrote:
: They are different in the "scalar [op] list" case, as explained here:
: <http://archive.develooper.com/perl6-language%40perl.org/msg10961.html>
: 
:     ($a = 0) [+=] @b;   # sum
:     ($a = 1) [*=] @b;   # product
:     ($a ='') [~=] @b;   # cat

That's almost a reduce.  Pity you have to include a variable.
But since rvalues are illegal on the left side of an assignment, we
*could* go as far as to say that

     0 [+=] @b;   # sum
     1 [*=] @b;   # product
    '' [~=] @b;   # cat

dwim into reduce operators rather than being illegal.

Larry

Reply via email to