diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-02 17:27:19 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-02 17:43:17 +0000 |
| commit | d8e2bad7d08bb96937815de4f3fd1bcbe2c440bd (patch) | |
| tree | 64463299ae1b363a2addde0559f094193dd94759 /core/invoke.moon | |
| parent | lift remaining libs to new op interface (diff) | |
| download | alive-d8e2bad7d08bb96937815de4f3fd1bcbe2c440bd.tar.gz alive-d8e2bad7d08bb96937815de4f3fd1bcbe2c440bd.zip | |
dynamic scoping
Diffstat (limited to 'core/invoke.moon')
| -rw-r--r-- | core/invoke.moon | 4 |
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 |
