Help for this page
sub max (::Type *$first, Type *@rest --> Type) { ... }
sub max ( ::Type *$first, Type *@rest # one or more values in list context :&compare:(Type $, Type $ --> Bool) = &[less] # function, with de +fault --> Type) # returns the same type as the arguments { ... }
my $comp = { length($^left) > length($^right) } my $result = max @values :compare<$comp>; # use adverb syntax
www.com | www.net | www.org
No recent polls found