diff options
| author | mryouse | 2022-07-07 02:04:28 +0000 |
|---|---|---|
| committer | mryouse | 2022-07-07 02:04:28 +0000 |
| commit | f4622e734ef2be1c3793113e93219d593e3e11fb (patch) | |
| tree | 2c37586c7583d42c3e3ad98b522f23c0003089f9 /neb/std/functools.py | |
| parent | 276dd853729a7c71ef4805786793bbc8f651b00d (diff) | |
refactor move all functions with 'lazy' to core
Diffstat (limited to 'neb/std/functools.py')
| -rw-r--r-- | neb/std/functools.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/neb/std/functools.py b/neb/std/functools.py index 9e426b8..8a76e98 100644 --- a/neb/std/functools.py +++ b/neb/std/functools.py @@ -34,13 +34,3 @@ def interpretMap(symbol, args, env, ns): FUNCTOOLS.register("map", Builtin("map", interpretMap, [Arg("func", TypeEnum.ANY), Arg("list", TypeEnum.LIST)], return_type=Type(":list"))) -def interpretApply(symbol, args, env, ns): - # TODO: to support lambdas, we can't assume the func is defined - func = args[0] - if not isinstance(func, Symbol): - raise InterpretPanic(symbol, "requires a symbol as its first argument", func) - 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)])) - |
