Skip to content

Instantly share code, notes, and snippets.

@mcmillhj mcmillhj/stack.p6
Last active May 4, 2018

What would you like to do?
Missing Block error on line 20
class Stack {
has Int @!store;
method push(Int:D $elem --> Nil) {
push @!store, $elem;
method pop(--> Int) {
die "UNDERFLOW" if;
pop @!store;
method peek(--> Int) {
@!store[* - 1];
method is-empty(-> Bool) { # Missing block
@!store.elems == 0;
my $s =;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.