develooper Front page | perl.perl6.language | Postings from August 2005

Re: zip with ()

Thread Previous | Thread Next
August 1, 2005 04:14
Re: zip with ()
Message ID:

Andrew Shitov wrote:
> Is it possible to avoid significance of whitespaces?

Yes, with:

   say zip .(@odd, @even);

Looks like a method and *is* a method in my eyes.
First &zip is looked-up and then bound as block owner.
Arguments are of course two array refs to @odd and @even

BTW, you didn't mean originally:

   say zip (@odd), (@even); # prints 13572468 or 12345678?

Does &zip now interleave two array refs instead
of flattened arrays?

> I think, such an aspect of Perl 6 would be awful.

> IB> Whitespace is significant:
> IB>     say zip(@odd, @even);
> IB>     say zip (@odd, @even);
$TSa.greeting := "HaloO"; # mind the echo!

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