Skip to content

Commit

Permalink
RT #66352, List.reduce and multi subs
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Aug 7, 2012
1 parent b3c2006 commit 59ded64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S32-list/reduce.t
Expand Up @@ -11,7 +11,7 @@ L<"http://groups.google.com/groups?selm=420DB295.3000902%40conway.org">
=end description

plan 13;
plan 14;

# L<S32::Containers/List/=item reduce>

Expand Down Expand Up @@ -62,6 +62,13 @@ eval_lives_ok( 'reduce -> $a, $b, $c? { $a + $b * ($c//1) }, 1, 2', 'Use proper
is( ((1..4).list.reduce: &infix:<*>), 24, '.reduce: &infix:<*> works' );
}

# RT #66352
{
multi a (Str $a, Str $b) { [+$a, +$b] };
multi a (Array $a,$b where "+") { [+] @($a) };
is ("1", "2", "+").reduce(&a), 3, 'reduce and multi subs';
}

done;

# vim: ft=perl6

0 comments on commit 59ded64

Please sign in to comment.