Our functional-programming brethren might prefer the tail-recursive<pedantic> AND() should be true.sub OR { @_ > 1 ? shift || OR(@_) : shift; } sub AND { @_ > 1 ? shift && AND(@_) : shift; }
sub OR { @_ ? shift || OR(@_) : 0; } sub AND { @_ ? shift && AND(@_) : 1; }
</pedantic>
the lowliest monk
In reply to Re^2: An infix fix
by tlm
in thread An infix fix
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |