Skip to content

Commit

Permalink
Allow .shift from an empty list like P5
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Oct 25, 2010
1 parent d4cfcab commit f288668
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v6/tryfile
Expand Up @@ -4,6 +4,10 @@ use MONKEY_TYPING;
use STD;
use STDStash;

augment class List {
method shift() { self!fill(1) ?? self!shift-item !! Any }
}

augment class STD {
method panic($str) { die "$str at {self.pos}" }
}
Expand Down

0 comments on commit f288668

Please sign in to comment.