author | Alan Dipert
<alan@dipert.org> 2019-08-09 21:24:27 UTC |
committer | Alan Dipert
<alan@dipert.org> 2019-08-09 21:24:27 UTC |
parent | eb0481e4d2d82cbf66a88561f90db7f1e3264be0 |
jacl.js | +4 | -8 |
diff --git a/jacl.js b/jacl.js index 7510d7d..aefd474 100644 --- a/jacl.js +++ b/jacl.js @@ -41,18 +41,14 @@ class LispSymbol { this.stack = []; } val() { - if (this.value === KEYS.UNBOUND) { + if (this.value === KEYS.UNBOUND) throw new Error(`Variable '${this.name}' unbound`); - } else { - return this.value; - } + return this.value; } func() { - if (this.fvalue === KEYS.UNBOUND) { + if (this.fvalue === KEYS.UNBOUND) throw new Error(`Function '${this.name}' unbound`); - } else { - return this.fvalue; - } + return this.fvalue; } pushBinding(v) { this.stack.push(this.value);