Permalink
Browse files

Mark List.pop and List.shift as "is parcel"

  • Loading branch information...
1 parent 5023481 commit 93f30e80e72dc79afb5d182d608a55b24f1935b0 @lizmat lizmat committed Jul 7, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/List.pm
View
@@ -170,7 +170,7 @@ my class List does Positional {
}
}
- method pop() is rw {
+ method pop() is parcel {
fail 'Cannot .pop from an infinite list' if self.infinite; #MMD?
my $elems = self.elems;
$elems > 0
@@ -225,7 +225,7 @@ my class List does Positional {
$rlist;
}
- method shift() is rw {
+ method shift() is parcel {
# make sure we have at least one item, then shift+return it
nqp::islist($!items) && nqp::existspos($!items, 0) || self.gimme(1)
?? nqp::shift($!items)

0 comments on commit 93f30e8

Please sign in to comment.