Skip to content

Commit

Permalink
another reduce test
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 15, 2013
1 parent 0cc2f52 commit 108daca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/mojo/collection.t
Expand Up @@ -84,6 +84,8 @@ is_deeply [@$collection], [1, 2, 3], 'right elements';
$collection = c(1, 2, 3);
is $collection->reduce(sub { shift() + shift() }), 6, 'right result';
is $collection->reduce(sub { $_[1] . $_[0] })->quote, '"321"', 'right result';
is $collection->reduce(sub { $_[0] > $_[1] ? $_[0] : $_[1] }), 3,
'right result';

# reverse
$collection = c(3, 2, 1);
Expand Down

0 comments on commit 108daca

Please sign in to comment.