@@ -2720,13 +2720,33 @@ Returns the smallest of the arguments, as determined by L<cmp|/routine/cmp> sema
2720
2720
my $foo = 42;
2721
2721
$foo min= 0 # read as: $foo decreases to 0
2722
2722
2723
+ B < Note: > Before 2022.06, in the cases of ties L < C < &min > |/type/Any#routine_min>
2724
+ would return the first argument with that value, whereas C < &[min] > would return
2725
+ its RHS. After 2022.06, C < &[min] > returns its LHS in the case of ties, and now
2726
+ both return the same value as dictated by their List associativity.
2727
+
2728
+ say min 0, False; # OUTPUT: «0»
2729
+ say 0 min False; # OUTPUT: «0»
2730
+ say min False, 0; # OUTPUT: «False»
2731
+ say False min 0; # OUTPUT: «False»
2732
+
2723
2733
= head2 infix C « max »
2724
2734
2725
2735
Returns the largest of the arguments, as determined by L < cmp|/routine/cmp > semantics.
2726
2736
2727
2737
my $foo = -42;
2728
2738
$foo max= 0 # read as: $foo increases to 0
2729
2739
2740
+ B < Note: > Before 2022.06, in the cases of ties L < C < &max > |/type/Any#routine_max>
2741
+ would return the first argument with that value, whereas C < &[max] > would return
2742
+ its RHS. After 2022.06, C < &[max] > returns its LHS in the case of ties, and now
2743
+ both return the same value as dictated by their List associativity.
2744
+
2745
+ say max 0, False; # OUTPUT: «0»
2746
+ say 0 max False; # OUTPUT: «0»
2747
+ say max False, 0; # OUTPUT: «False»
2748
+ say False max 0; # OUTPUT: «False»
2749
+
2730
2750
= head2 infix C « minmax »
2731
2751
2732
2752
Returns the L < Range|/type/Range > starting from the lowest to the highest of the values,
0 commit comments