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

Re: zip with ()

Thread Previous | Thread Next
From:
=?UTF-8?B?IlRTYSAoVGhvbWFzIFNhbmRsYcOfKSI=?=
Date:
August 1, 2005 04:53
Subject:
Re: zip with ()
Message ID:
42EE0D44.3070202@orthogon.com
HaloO,

Andrew Shitov wrote:
> TTS> BTW, you didn't mean originally:
> 
> TTS>    say zip (@odd), (@even); # prints 13572468 or 12345678?
> 
> That is exactly like with similar printing result of sub() call:
> 
>      print sqrt (16), 5; # shout print 45.

That all hinges on the type of the symbol. I guess &sqrt
is a unary prefix. Then

    print sqrt 16, 5; # should print 45 as well.

The point is, to not let &sqrt 'swallow' the 5 unless
it is declared listop.
-- 
$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