(defmulti send-multi (fn is-this-the-problem [msg] (-> msg :action keyword)))
#'user/send-multi
(let [dbl #(* 2 %)] (-> 42 dbl))
84
(macroexpand '#(-> #^File % .getPath (.replace "/" ".")))
(fn* [%1] (-> %1 .getPath (.replace "/" ".")))
(-> cdr a is car other my quote flatten)
(my other car is a cdr)
(macroexpand '(-> (one two three) (four five six)))
(four (one two three) five six)
(-> (range 10) vec (subvec 0 5) (conj :end))
[0 1 2 3 4 :end]
(macroexpand-1 '(mathly (ceil (exp (scalb (-> E sinh log1p log1p) (-> PI (atan2 PI) sqrt sin log toDegrees getExponent))))))
(mathly (ceil (exp (scalb (-> E sinh log1p log1p) (-> PI (atan2 PI) sqrt sin log toDegrees getExponent)))))
(-> [x [1 2 3]] (for (+ x 2)))
(3 4 5)
(defmacro current-function-desc [] `(-> (Throwable.) .getStackTrace first .toString unmangle))
#'user/current-function-desc
(macroexpand '(-> 1 (fn [x] (prn x) x)))
(fn 1 [x] (prn x) x)
(macroexpand-1 '(-> 1 (+ 2) dec (* 5)))
(* (dec (+ 1 2)) 5)
(-> (transient {}) (assoc! :x 1) (assoc! :y 2) persistent!)
{:x 1, :y 2}
(-> [1 2 3 4 5] pop (conj 42))
[1 2 3 4 42]
(-> 3 inc dec (as-> b [b (- b)]))
[3 -3]
(macroexpand-1 '(-> 10 (fn [x] (+ 3 x))))
(fn 10 [x] (+ 3 x))
(macroexpand-1 '(-> x foo bar (baz 3 4)))
(baz (bar (foo x)) 3 4)
(-> "(def ^:foo hello)" read-string second meta)
{:foo true}
(let [info count] (-> {:name "Foo", :age 12} info))
2
(defmacro sym-meta [sym] (-> &env (find sym) key meta))
#'user/sym-meta
(let [f (fn [x] (str x))] (-> :a f))
":a"
(-> [1 20 12 -2] ((partial apply max)) inc)
21
(-> true (and 1 2 (do (println "Side-effect") true)))
true
"Side-effect\n"
(-> [] (conj "foo" "bar") (->> (interpose "/") (apply str)))
"foo/bar"
(-> '(1 2 3 4) (nthrest 3) type)
clojure.lang.PersistentList
(map #(-> 10 range % class) [seq sequence])
(clojure.lang.LongRange clojure.lang.LongRange)
(-> 10 (+ 5) (as-> x (/ x 3)))
5
(reduce #(-> %2) '(1 2 3 4))
4
(-> ^{String "foo"} 'hi meta keys first class)
nil
(-> "(+ 3 3)" read-string eval print)
nil
"6"
(macroexpand-1 '(-> 1 (fn [x] (+ 3 x))))
(fn 1 [x] (+ 3 x))
(= (-> 3 inc inc) ((comp inc inc) 3))
true
(-> "a b c d" .toUpperCase (.replace "A" "X"))
"X B C D"
(apply (-> "+" symbol resolve) '(1 2 3))
6
(defmacro n [t] (println (macroexpand t) (-> 1 inc)))
#'user/n
(macroexpand-1 '(-> reg :cookies (get "fbc") :value nil?))
(nil? (:value (get (:cookies reg) "fbc")))
(-> [1 2] (->> (map inc) (reduce +)) inc)
6
(-> '(and a b c d) macroexpand-1 macroexpand-1)
(and a b c d)
(-> "two words" (#(clojure.string/split % #" ")) last)
"words"
(-> [i [1 2 3]] (for (* i i)))
(1 4 9)
(macroexpand '(-> (+ 1 2) '(comment whatever)))
(quote (+ 1 2) (comment whatever))
(filter #(-> % nil? not) [nil 1 2])
(1 2)
(-> (range 10) vec (subvec 0 4) (conj :end))
[0 1 2 3 :end]
(= (-> 3 inc -) ((comp - inc) 3))
true
(binding [*read-eval* true] (read-string "#=(-> 1 inc)"))
2
(macroexpand-1 '(-> {:foo 17} (assoc :bar "bar") println))
(println (assoc {:foo 17} :bar "bar"))
(-> "VK_CAPS_LOCK" (.substring 3) (.toLowerCase) (.replace \_ \-) (keyword))
:caps-lock
(-> nil (and 1 2 (do (println "Side-effect") true)))
nil
(let [sel :x] (-> {:x 5} sel (* 2)))
10
(defmacro magic-> [& body] `(fn [x] (-> x ~@body)))
#'user/magic->
(-> "foo" .toUpperCase .toLowerCase ((partial map int)) ((partial reduce *)))
1256742