Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add permutations.t
  • Loading branch information
TimToady committed Aug 2, 2014
1 parent dce5eab commit b66728f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions S32-list/permutations.t
@@ -0,0 +1,8 @@
use Test;

plan 2;

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

ok [[1, 2, 3].permutations] eqv [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]], "permutations method";
ok [permutations(3)] eqv [[0, 1, 2], [0, 2, 1], [1, 0, 2], [1, 2, 0], [2, 0, 1], [2, 1, 0]], "permutations function";

0 comments on commit b66728f

Please sign in to comment.