aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/interpreter.py b/interpreter.py
index 47b2363..60338f1 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -389,7 +389,7 @@ def interpretBranch(symbol, args, env):
if len(arg.args) != 2:
raise InterpretPanic(symbol, "each branch requires two expressions")
cond = evaluate(arg.args[0], env) # this is the condition
- if not isinstance(cond, Boolean):
+ if not isinstance(cond, Bool):
raise InterpretPanic(symbol, "branch condition must be :bool", cond)
if cond.value:
return evaluate(arg.args[1], env)
@@ -467,7 +467,7 @@ def interpretListLength(symbol, args, env):
ev = evaluate(args[0], env)
if not isinstance(ev, List):
raise InterpretPanic(symbol, "requires a :list", ev)
- return Literal(len(ev.args))
+ return Int(len(ev.args))
GLOBALS.register("list-length", Builtin(interpretListLength, 1))