aboutsummaryrefslogtreecommitdiff
path: root/neb/std/functools.py
diff options
context:
space:
mode:
authormryouse2022-06-22 04:33:37 +0000
committermryouse2022-06-22 04:33:37 +0000
commit4fb8e57aa6ea23a98d24e2193065dff49f2f0b75 (patch)
tree2451f016f59b9e4398463120cb05dced0589be1d /neb/std/functools.py
parent810d01108110901a290aa4d4a9cdf96187430d0d (diff)
bugfix: we need to return an Expr from apply, and List is no longer evaluated
Diffstat (limited to 'neb/std/functools.py')
-rw-r--r--neb/std/functools.py4
1 files changed, 2 insertions, 2 deletions
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)]))