File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,8 @@ Defined as:
554
554
multi sub min(+args)
555
555
556
556
Coerces the invocant to L < Iterable|/type/Iterable > and returns the numerically
557
- smallest element. In C < sub > form, the invocant is passed as an argument.
557
+ smallest element; in the case of C < Hash > es, it returns the C < Pair > with the
558
+ lowest value. In C < sub > form, the invocant is passed as an argument.
558
559
559
560
If a L < Callable|/type/Callable > positional argument is provided, each value is
560
561
passed into the filter, and its return value is compared instead of the original
@@ -564,6 +565,8 @@ value. The original value is still the one returned from C<min>.
564
565
say (1,7,3).min({1/$_}); # OUTPUT:«7»
565
566
say min(1,7,3); # OUTPUT: «1»
566
567
say min(1,7,3,:by( { 1/$_ } )); # OUTPUT: «7»
568
+ min( %(a => 3, b=> 7 ) ).say ; # OUTPUT: «a => 3»
569
+
567
570
568
571
= head2 method max
569
572
You can’t perform that action at this time.
0 commit comments