File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 (import-macros clojure.core
9494 [-> ->> .. assert comment cond
9595 declare defn-
96- doto
9796 extend-protocol fn for
9897 if-let if-not letfn
9998 memfn
176175 " defs the supplied var names with no bindings, useful for making forward declarations."
177176 [& names] `(do ~@(map #(core/list 'def (vary-meta % assoc :declared true )) names))))
178177
179- #?(:cljs
180- (core/defmacro doto
181- " Evaluates x then calls all of the methods and functions with the
182- value of x supplied at the front of the given arguments. The forms
183- are evaluated in order. Returns x.
178+ (core/defmacro doto
179+ " Evaluates x then calls all of the methods and functions with the
180+ value of x supplied at the front of the given arguments. The forms
181+ are evaluated in order. Returns x.
184182
185- (doto (new java.util.HashMap ) (.put \" a\" 1) (.put \" b\" 2))"
186- [x & forms]
187- (core/let [gx (gensym )]
188- `(let [~gx ~x]
189- ~@(map (core/fn [f]
190- (if (seq? f)
191- `(~(first f) ~gx ~@(next f))
192- `(~f ~gx)))
193- forms)
194- ~gx) )))
183+ (doto (new js/Map ) (.set \" a\" 1) (.set \" b\" 2))"
184+ [x & forms]
185+ (core/let [gx (gensym )]
186+ `(let [~gx ~x]
187+ ~@(map (core/fn [f]
188+ (if (seq? f)
189+ `(~(first f) ~gx ~@(next f))
190+ `(~f ~gx)))
191+ forms)
192+ ~gx)))
195193
196194#?(:cljs
197195 (core/defn- parse-impls [specs]
You can’t perform that action at this time.
0 commit comments