Skip to content

Commit

Permalink
[#415] lower level assoc - @joinr
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Sep 19, 2020
1 parent a939d1e commit 3bf3571
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sci/impl/fns.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{:no-doc true}
(:require [sci.impl.types :as t]))

#?(:clj (set! *warn-on-reflection* true))

(defn throw-arity [fn-name macro? args]
(throw (new #?(:clj Exception
:cljs js/Error)
Expand All @@ -15,7 +17,7 @@
(getVal [this] val))

(defn parse-fn-args+body
[ctx interpret eval-do*
[^clojure.lang.Associative ctx interpret eval-do*
{:sci.impl/keys [fixed-arity var-arg-name params body] :as _m}
fn-name macro? with-meta?]
(let [min-var-args-arity (when var-arg-name fixed-arity)
Expand Down Expand Up @@ -44,7 +46,8 @@
(when args*
(throw-arity fn-name macro? args))
ret)))
ctx (assoc ctx :bindings bindings)
ctx (#?(:clj .assoc
:cljs -assoc) ctx :bindings bindings)
ret (return ctx)
;; m (meta ret)
recur? (instance? Recur ret)]
Expand Down

0 comments on commit 3bf3571

Please sign in to comment.