# New Ticket Created by "Dave Whipp"
# Please include the string: [perl #62742]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=62742 >
According to S29, the "min" and "max" methods should accept the same
ordering args as "sort":
say "{(1..10).sort: { ($_-3) * ($_-5) }}";
>>> 4 3 5 2 6 1 7 8 9 10
say (1..10).min: { ($_-3) * ($_-5) };
>>> 4
The former works as expected: the latter fails:
% ./perl6 -e 'say (1..10).min: { ($_-3) * ($_-5) }'
too many arguments passed (3) - 1 params expected
current instr.: 'parrot;Range;min' pc 7736 (src/classes/Range.pir:143)
called from Sub '_block14' pc 106 (EVAL_20:49)
called from Sub '!UNIT_START' pc 18152 (src/builtins/guts.pir:321)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 950
(src/PCT/HLLCompiler.pir:527)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1496
(src/PCT/HLLCompiler.pir:787)
called from Sub 'parrot;Perl6;Compiler;main' pc 22199 (perl6.pir:159)
Exit 1