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

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

Thread Previous | Thread Next
Larry Wall
May 16, 2005 16:06
Re: not 4,3,2,1,0;
Message ID:
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.


    sub not (*args is context(Scalar))

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


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