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

Re: zip with ()

Thread Previous | Thread Next
From:
=?ISO-8859-1?Q?=22TSa_=28Thomas_Sandla=DF=29=22?=
Date:
August 1, 2005 04:14
Subject:
Re: zip with ()
Message ID:
42EE03F0.3000500@orthogon.com
HaloO,

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
respectively.

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


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