Skip to content

Commit

Permalink
fix for .combinations timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Jan 30, 2014
1 parent 04c4fba commit d6a93b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/List.pm
Expand Up @@ -4,8 +4,10 @@ my class X::TypeCheck { ... }
my sub combinations($n, $k) {
my @result;
my @stack;
@stack.push(0);

return () unless $k;

@stack.push(0);
gather while @stack {
my $index = @stack - 1;
my $value = @stack.pop;
Expand Down

0 comments on commit d6a93b0

Please sign in to comment.