From 4fb8e57aa6ea23a98d24e2193065dff49f2f0b75 Mon Sep 17 00:00:00 2001 From: mryouse Date: Wed, 22 Jun 2022 04:33:37 +0000 Subject: bugfix: we need to return an Expr from apply, and List is no longer evaluated --- neb/std/functools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'neb/std/functools.py') diff --git a/neb/std/functools.py b/neb/std/functools.py index 83475b9..facc97d 100644 --- a/neb/std/functools.py +++ b/neb/std/functools.py @@ -39,8 +39,8 @@ def interpretApply(symbol, args, env, ns): func = args[0] if not isinstance(func, Symbol): raise InterpretPanic(symbol, "requires a symbol as its first argument", func) - new_lst = List([func] + args[1].args) - return evaluate(new_lst, env, ns) + new_expr = Expr([func] + args[1].args) + return evaluate(new_expr, env, ns) FUNCTOOLS.register("apply", Builtin("apply", interpretApply, [Arg("func", TypeEnum.ANY, lazy=True), Arg("list", TypeEnum.LIST)])) -- cgit v1.2.3