diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-09 23:58:27 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-09 23:58:27 -0500 |
| commit | a34b02006527d28db5df5c6553be804770b81f79 (patch) | |
| tree | 526fe400e5a8c34b32a3d93439197db09c7f84ad /clojure/src/step6_file.clj | |
| parent | edc3b0640f1b773e185550448e2086279f7b1a7f (diff) | |
| download | mal-a34b02006527d28db5df5c6553be804770b81f79.tar.gz mal-a34b02006527d28db5df5c6553be804770b81f79.zip | |
Fix metadata on functions.
- Don't use metadata to store ast, env, params data.
- In Clojure, store metadata on the :meta key of the real metadata.
This also allows using any datatype as metadata.
Diffstat (limited to 'clojure/src/step6_file.clj')
| -rw-r--r-- | clojure/src/step6_file.clj | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clojure/src/step6_file.clj b/clojure/src/step6_file.clj index a65b741..46bab16 100644 --- a/clojure/src/step6_file.clj +++ b/clojure/src/step6_file.clj @@ -58,11 +58,12 @@ (recur a2 env))) 'fn* - ^{:expression a2 - :environment env - :parameters a1} - (fn [& args] - (EVAL a2 (env/env env a1 args))) + (with-meta + (fn [& args] + (EVAL a2 (env/env env a1 args))) + {:expression a2 + :environment env + :parameters a1}) ;; apply (let [el (eval-ast ast env) |
