aboutsummaryrefslogtreecommitdiffstats
path: root/core/invoke.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-03-02 17:27:19 +0000
committers-ol <s-ol@users.noreply.github.com>2020-03-02 17:43:17 +0000
commitd8e2bad7d08bb96937815de4f3fd1bcbe2c440bd (patch)
tree64463299ae1b363a2addde0559f094193dd94759 /core/invoke.moon
parentlift remaining libs to new op interface (diff)
downloadalive-d8e2bad7d08bb96937815de4f3fd1bcbe2c440bd.tar.gz
alive-d8e2bad7d08bb96937815de4f3fd1bcbe2c440bd.zip
dynamic scoping
Diffstat (limited to 'core/invoke.moon')
-rw-r--r--core/invoke.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/invoke.moon b/core/invoke.moon
index 7b14e97..1fac7b8 100644
--- a/core/invoke.moon
+++ b/core/invoke.moon
@@ -39,12 +39,12 @@ class fn_invoke extends Action
assert #params == #tail, "argument count mismatch in #{@head}"
- fn_scope = Scope @, scope
+ fn_scope = Scope scope, outer_scope
children = for i=1,#params
name = params[i]\unwrap 'sym'
with L\push tail[i]\eval, outer_scope
- fn_scope\set name, .value
+ fn_scope\set name, \make_ref!
body = body\clone @tag
result = body\eval fn_scope