class YourMom {
constructor() {
this.stack = [];
this.memory = new Array(1024);
}
run(tokens) {
while (tokens.length) {
var tok = tokens.shift();
if (NUMS.indexOf(tok) != -1) {
this.stack.push(this.stack.pop() * 10 + (tok.charCodeAt(0) - 0x30))
} else switch (tok) {
case "+": this.applydyadic((a, b) => a + b);
case "-": this.applydyadic((a, b) => a - b);
case "*": this.applydyadic((a, b) => a * b);