in reply to Re: An infix fix
in thread An infix fix
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: An infix fix
by Roy Johnson (Monsignor) on Mar 22, 2005 at 22:59 UTC | |
by tlm (Prior) on Mar 22, 2005 at 23:37 UTC | |
by Roy Johnson (Monsignor) on Mar 23, 2005 at 00:13 UTC | |
|
Re^3: An infix fix
by tlm (Prior) on Mar 22, 2005 at 23:05 UTC | |
by Roy Johnson (Monsignor) on Mar 22, 2005 at 23:30 UTC |