Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/pugs
    use v6;
    ...
        @stack.elems == 1 or die "Invalid stack:[@stack[]]\n";
        return @stack[0];
    }
    
  2. or download this
    1;0 eric256@feather:~/tests$ pugs rpn_calc.p6
    Match 1:
    ...
    
    test1 == 1 2 +  == 3
    test2 == 1 2 3 + -  == -4