TSa wrote:
> HaloO,
> 
> Daniel Ruoso wrote:
>> Em Ter, 2009-02-17 às 09:19 -0300, Daniel Ruoso escreveu:
>>> multi infix:<+> (int where { 2 } $i, int where { 2 } $j) {...}
>> 
>> As masak++ and moritz++ pointed out, this should be written
>> 
>> multi infix:<+> (int $i where 2, int $j where 2) {...}
> 
> Hmm, both these forms strike me as odd because the where clause
> should return a boolean and thus has to be written 'where { $_ == 2}'.

A where clause without a block does a smartmatch, so $i where 2 is the
same as $i where { $i ~~ 2 }.

Cheers,
Moritz
-- 
Moritz Lenz
http://perlgeek.de/ |  http://perl-6.de/ | http://sudokugarden.de/

Reply via email to