t/spec/S29-list/sort.t has the following test: my @a = (2, 45, 6, 1, 3); my @e = (1, 2, 3, 6, 45); my @s = { $^a <=> $^b }.sort: @a; is(@s, @e, '... with closure as direct invocant');
S29 doesn't show a 'sort' method defined on block/closure invocants... should there be? Note that we already have: my @s = sort { $^a <=> $^b }, @a; my @s = @a.sort { $^a <=> $^b }; A similar question applies for .reduce in S29-list/reduce.t : is(({ $^a * $^b }.reduce: 1,2,3,4,5), 120, "basic reduce works (3)"); Thanks! Pm