Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 93f30e80e72dc79afb5d182d608a55b24f1935b0 1 parent 5023481
lizmat lizmat authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/List.pm
4 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)
Please sign in to comment.
Something went wrong with that request. Please try again.