Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #632 from grondilu/patch-9
cosmetic change in permutations
  • Loading branch information
jnthn committed Dec 13, 2015
2 parents 4bc8f33 + 50879b2 commit a360f3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/native_array.pm
Expand Up @@ -743,7 +743,8 @@ sub permutations(int $n where $n > 0) {
# @!a[$k+1 .. @!a.end].=reverse;
$l = $!n;
(@!a[$k] +^= @!a[$l]) +^= @!a[$l] +^= @!a[$k] until ++$k >= --$l;
@!a.List; }
@!a.List;
}
method count-only { [*] 1 .. $!n }
}.new(:$n)
);
Expand Down

0 comments on commit a360f3b

Please sign in to comment.