develooper Front page | perl.perl6.language | Postings from June 2009

Re: The game of life

Thread Previous | Thread Next
John M. Dlugosz
June 1, 2009 18:08
Re: The game of life
Message ID:
yary |Perl 6| wrote:
>>  <>
> 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?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About