(-> 2 ((fn [x] (+ x 2))))
4
(let [ms [{:a 1, :b 2} {:c 3}]] (-> ms pop (conj (-> ms peek (merge {:d 4})))))
[{:a 1, :b 2} {:c 3, :d 4}]
(meta (macroexpand '^String (-> x (identity))))
{:column 36, :line 1}
(macroexpand-1 '(-> 10 [1 2 3]))
([1 2 3] 10)
(macroexpand-1 '(-> "text" #(println %)))
(fn* "text" [%1] (println %1))
(-> [[1 2] 3 4] first first)
1
(-> {:a 1, :b 2} pr-str read-string)
{:a 1, :b 2}
(-> [:keyword {:key "VALUE"}] (get 1) :key)
"VALUE"
(-> {} (assoc :a 1) (apply dissoc [:b]))
:b
(-> [{:body {:status "test"}}] first :body :status)
"test"
(map #(-> [% %]) (range 5))
([0 0] [1 1] [2 2] [3 3] [4 4])
(-> 5 inc inc (doto println) dec)
6
"7\n"
(-> 30 str symbol pr-str read-string class)
java.lang.Long
(read-string "(-> 1 @foo :ugh)")
(-> 1 (clojure.core/deref foo) :ugh)
(-> 1 (+ 2) dec (* 5))
10
(macroexpand '(-> % int (- 48)))
(- (int %) 48)
(defmacro urgh [] `(-> foo bar baz))
#'user/urgh
(-> "somesting" (clojure.string/split #"") (->> (clojure.string/join "")))
"somesting"
(map #(-> [:foo %]) (range 3))
([:foo 0] [:foo 1] [:foo 2])
(-> (+ 3 4) (* 7) -)
-49
(macroexpand '(-> ! #(! [%])))
(fn* ! [%1] (! [%1]))
(macroexpand-1 '(-> x ((partial partition 2))))
((partial partition 2) x)
(-> 30 (range) (distinct) (->> (map inc)))
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)
(-> 1 ((fn [x] (+ x 1))))
2
(macroexpand-1 '(-> "wat" #(identity %)))
(fn* "wat" [%1] (identity %1))
(-> :thus do do do do do)
:thus
(macroexpand '(-> a b c d))
(d (c (b a)))
(-> 5 (doto (do (println "a string"))))
5
"a string\n"
(macroexpand-1 '(-> "foo" ((fn [x] x))))
((fn [x] x) "foo")
(-> {} (assoc :a 1) (assoc :b 2))
{:a 1, :b 2}
(let [a (atom {})] (-> 1 (@a) :ugh))
nil
(clojure.walk/macroexpand-all '(-> (read) (eval) (println) (loop-forever)))
(loop-forever (println (eval (read))))
(meta (macroexpand ^String '(-> x (identity))))
{:column 35, :line 1}
(-> [] (with-meta {:foo :bar}) transient persistent! meta)
nil
(-> [:foo] first name symbol list str)
"(foo)"
(-> {:headers {"Content-Type" "text/html"}} :headers (get "Content-Type"))
"text/html"
(-> '(let [a 1]) second first meta)
nil
(macroexpand '(-> 1 (+ 2) (* 3)))
(* (+ 1 2) 3)
(-> "+" symbol resolve meta :name name keyword)
:+
(-> 2 (+ 4) (* 3) (- 7))
11
(-> 5 inc (* 4 (+ 2 7)))
216
(-> {:fn #(identity 42)} :fn (apply nil))
42
(macroexpand-1 '(-> [old-position move] (partial apply interleave)))
(partial [old-position move] apply interleave)
(defn names-a-macro? [sym] (-> (resolve sym) meta :macro))
#'user/names-a-macro?
(-> 6 (* 3) (/ 5) (+ 4))
38/5
(-> 3 (* 2) (* 2) (* 2))
24
(-> foo #(+ % 2) (apply [3]))
5
(clojure.core/macroexpand '(-> c (+ 3) (* 2)))
(* (+ c 3) 2)
(clojure.walk/macroexpand-all '(-> 1 inc dec (* 10)))
(* (dec (inc 1)) 10)
(-> 2 (as-> x (do (println x) x)))
2
"2\n"