aboutsummaryrefslogtreecommitdiff
path: root/neb/std
diff options
context:
space:
mode:
Diffstat (limited to 'neb/std')
-rw-r--r--neb/std/boolean.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/neb/std/boolean.py b/neb/std/boolean.py
index 1c8b8ae..f9326ee 100644
--- a/neb/std/boolean.py
+++ b/neb/std/boolean.py
@@ -1,4 +1,4 @@
-from .. import TypeEnum, Environment, Arg, Builtin, evaluate, InterpretPanic, TypeWrap
+from .. import TypeEnum, Environment, Arg, Builtin, evaluate, InterpretPanic, TypeWrap, MultiFunction
from ..structs import *
BOOLEAN = Environment()
@@ -22,11 +22,16 @@ def interpretEq(symbol, args, env, ns):
raise InterpretPanic(symbol, "unknown comparison type", args[0])
eq_arg = Arg("value", TypeEnum.ANY)
-BOOLEAN.register("eq?", Builtin("eq?", interpretEq, [eq_arg, eq_arg], return_type=Type(":bool")))
+eq_func = Builtin("eq?", interpretEq, [eq_arg, eq_arg], return_type=Type(":bool"))
+eq_multi = MultiFunction("eq?")
+eq_multi.register(eq_func)
+BOOLEAN.register("eq?", eq_multi)
def interpretNot(symbol, args, env, ns):
return Bool(not args[0].value)
not_arg = Arg("not", TypeEnum.BOOL)
-BOOLEAN.register("not", Builtin("not", interpretNot, [not_arg], return_type=Type(":bool")))
+not_func = Builtin("not", interpretNot, [not_arg], return_type=Type(":bool"))
+not_multi = MultiFunction("not")
+BOOLEAN.register("not", not_multi)