yary not.com-at-gmail.com |Perl 6| wrote:
 <http://www.dlugosz.com/Perl6/web/APL.html>

The rho example is interesting, though it doesn't compile in current Rakudo.

"1 2 3 ⍴¨ 10 would natively be written in Perl 6 as 10 »xx« (1,2,3)."

perl6 complains about non-dwimmyness. 10 <<xx>> (1,2,3) gives
(10),(10,10),(10,10,10) , I think that matches the rho example.

Ah, I seem to remember something about which way the arrows point with a scalar. I'll look it up.


"So let’s implement the APL ⌿ operator which works on the columns of a matrix."

I think that's something that perl6 could do better then APL. From
what I understand, APL has some operators that work on columns and
other similar ones that work on rows, p6 has an opportunity to take
the direction/dimension as an argument. Which is something I'm
thinking about...
Good point.  Even infix operators can take adjectives!

Can the same effect be achieved with slices?

--John

Reply via email to