Help for this page

Select Code to Download


  1. or download this
    sub max {
        my( $i, @l ) = @_;
        my $j = @l ? max( @l ) : $i;
        return $i > $j ? $i : $j;
    }
    
  2. or download this
    sub max {
        $_[ 0 ] < $_[ -1 ] ? shift : pop while @_ > 1;
        return @_;
    }