We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 966234e commit e26bb23Copy full SHA for e26bb23
src/applied_science/js_interop.cljc
@@ -15,8 +15,10 @@
15
(defmacro let [& body]
16
`(clojure.core/let ~@body))
17
18
-(defmacro call-in [obj path & fs]
19
- `(.. ~obj ~@(map #(symbol (str "-" (name %))) path) ~@(map list fs)))
+(defmacro call-in [obj path & args]
+ `(let [parent# (clojure.core/get-in ~obj ~(vec (butlast path)))
20
+ f# (clojure.core/get parent# ~(last path))]
21
+ (.call f# parent# ~@args)))
22
23
(defmacro call [obj f & args]
24
(list* (symbol (str "." (name f))) obj args))
0 commit comments