There's also the Quantum::Superpositions approach:
sub min { eigenstates( any(@_) <= all(@_) ) } sub max { eigenstates( any(@_) >= all(@_) ) }
In the real world, I'd use List::Util::max; if I wrote my own, it'd be this small variation on solutions above:
sub max { my $max = shift; $max = $max > $_ ? $max : $_ for @_; return $max }
In reply to Re: Finding the max()/min()
by Zed_Lopez
in thread Finding the max()/min()
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |