diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-09 18:05:30 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-10-09 18:05:30 -0500 |
| commit | d667a1bb2e7294f8722bb31f1e6e8207b971c913 (patch) | |
| tree | c79dff4e32c3d1a73369ba3203b435f0212aab45 /go/src/step7_quote | |
| parent | 82efc357ba67da1eaf35ca92b6f249a344aae8d5 (diff) | |
| download | mal-d667a1bb2e7294f8722bb31f1e6e8207b971c913.tar.gz mal-d667a1bb2e7294f8722bb31f1e6e8207b971c913.zip | |
go: add stepA_more. try* and more core functions.
Diffstat (limited to 'go/src/step7_quote')
| -rw-r--r-- | go/src/step7_quote/step7_quote.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/go/src/step7_quote/step7_quote.go b/go/src/step7_quote/step7_quote.go index 8642cf0..4083354 100644 --- a/go/src/step7_quote/step7_quote.go +++ b/go/src/step7_quote/step7_quote.go @@ -156,9 +156,7 @@ func EVAL(ast MalType, env EnvType) (MalType, error) { ast = a2 } case "fn*": - fn := MalFunc{EVAL, a2, env, a1, false, - func(outer EnvType, binds []MalType, exprs []MalType) (EnvType, error) { - return NewEnv(outer, binds, exprs) }} + fn := MalFunc{EVAL, a2, env, a1, false, NewEnv} return fn, nil default: el, e := eval_ast(ast, env) @@ -167,7 +165,7 @@ func EVAL(ast MalType, env EnvType) (MalType, error) { if MalFunc_Q(f) { fn := f.(MalFunc) ast = fn.Exp - env, e = NewEnv(fn.Env, fn.Params.(List).Val, el.(List).Val[1:]) + env, e = NewEnv(fn.Env, fn.Params, List{el.(List).Val[1:]}) if e != nil { return nil, e } } else { fn, ok := f.(func([]MalType)(MalType, error)) |
