Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle checking for infinite lists
  • Loading branch information
lizmat committed May 24, 2015
1 parent b9b7f4c commit 93e61dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/List.pm
Expand Up @@ -575,7 +575,8 @@ my class List does Positional { # declared in BOOTSTRAP
}

method rotor(List:D: *@cycle, :$partial) is nodal {
die "Must specify *how* to rotor a List" unless @cycle;
die "Must specify *how* to rotor a List"
unless @cycle.infinite || @cycle;

my $finished = 0;
# (Note, the xx should be harmless if the cycle is already infinite by accident.)
Expand Down

0 comments on commit 93e61dc

Please sign in to comment.