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

Re: not 4,3,2,1,0;

Thread Previous | Thread Next
From:
Larry Wall
Date:
May 16, 2005 16:06
Subject:
Re: not 4,3,2,1,0;
Message ID:
20050516230615.GA14358@wall.org
On Tue, May 17, 2005 at 05:32:27AM +0800, Autrijus Tang wrote:
: Ok, but I'm still not too sure about what signature will Perl 6's &not
: have, that can impose singular context on each of its argument (so that
: not(@foo) won't flatten), but still accept an unlimited number of
: arguments.  It's something like:
: 
:     multi sub not (Bool $x1)
:     multi sub not (Bool $x1, Bool $x2)
:     multi sub not (Bool $x1, Bool $x2, Bool $x3)
:     ...
: 
: But I'm not sure about how to express it in one line.

That's

    sub not (*args is context(Scalar))

or whatever we end up calling the Any/Scalar type.

Larry

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