(-> [1 2 3] (concat [4]) (conj 5))
(5 1 2 3 4)
(-> {:a {:b {:c 1}}} :a :b :c)
1
(macroexpand-1 '(-> x (fn [y] (z y))))
(fn x [y] (z y))
(macroexpand '(-> p1__2529 .getPath (.replace "/" ".")))
(.replace (.getPath p1__2529) "/" ".")
(-> {:a {:b {:c 1}}} :a :b :c)
1
(-> 1 ((apply comp [inc inc inc])) vector)
[4]
(macroexpand-1 '(-> 1 ((fn [x] (inc x)))))
((fn [x] (inc x)) 1)
(-> 'clojure.core ns-publics keys ((partial filter '#{remove})))
(remove)
(-> #(+ % 2) (map (range 10)))
(2 3 4 5 6 7 8 9 10 11)
(macroexpand '(-> % ((fn [x] (:name x)))))
((fn [x] (:name x)) %)
(macroexpand-1 '(-> 1 (+ 1) (* 2)))
(* (+ 1 1) 2)
(-> (with-meta [] {String "foo"}) meta keys first class)
java.lang.Class
((-> [a b] (fn [b a])) 1 2)
[2 1]
(defmacro sqdata ([& args] `(-> @*sqdata* ~@args)))
#'user/sqdata
(let [x 1] (-> x inc (as-> y (-> y (+ 10) (as-> z [x y z])))))
[1 2 12]
(defmacro apply-rules [init fns] `(-> ~init ~@fns))
#'user/apply-rules
(-> {:a {:b {:c 42}}} :a :b :c)
42
(-> {:foo (with-meta #() {:meta 1})} :foo meta)
{:meta 1}
(do (require 'clojure.walk) (clojure.walk/macroexpand-all ''(-> a b)))
(quote (b a))
(defmacro cur-fn [] `(-> (Throwable.) .getStackTrace first .getClassName))
#'user/cur-fn
(-> what the heck was I thinking? comment)
nil
(-> 1 (* 2) (+ 3) (* 2))
10
(macroexpand '(-> 1 (+ 2) (+ 3)))
(+ (+ 1 2) 3)
(-> 5 inc (* 4) (+ 2 7))
33
(-> {:name {:first-name "Alice", :last-name "Silverman"}} :name :first-name)
"Alice"
(macroexpand '(-> 5 (+ 2) (+ 3)))
(+ (+ 5 2) 3)
(-> "abc" .toUpperCase reverse (#(apply str %)))
"CBA"
(macroexpand '(-> state (assoc-in [:x] args now)))
(assoc-in state [:x] args now)
(-> 8 inc dec (+ 10) (str "foo"))
"18foo"
(let* [a 1] (-> 1 inc (* 2)))
4
(macroexpand-1 '(-> default-trip (add-person "person1") (remove-person "person1")))
(remove-person (add-person default-trip "person1") "person1")
(macroexpand-1 '(-> {:a {:b 1}} :a :b))
(:b (:a {:a {:b 1}}))
(for [p #{[2] [3]}] (-> p type))
(clojure.lang.PersistentVector clojure.lang.PersistentVector)
(-> xyx quote str (.indexOf "y") neg? not)
true
(-> :x :y :z {:z {:y {:x 5}}})
nil
(macroexpand '(((-> [%] #(list %)) 10)))
(((-> [%] (fn* [%1] (list %1))) 10))
(macroexpand '(-> 1 (fn [x] (inc x))))
(fn 1 [x] (inc x))
(clojure.walk/macroexpand-all '(-> 1 inc #(inc %)))
(fn* (inc 1) [%1] (inc %1))
(-> 5 (#(- 6 %)) (+ 3))
4
(-> [1 2] ((fn [[a b]] [b a])))
[2 1]
(macroexpand `(-> {:a 0, "b" 4} ("b")))
("b" {:a 0, "b" 4})
(-> "foo-bar" (clojure.string/replace "bar" "baz") (clojure.string/replace "foo" "goo"))
"goo-baz"
(-> 1 (as-> x (inc x) (dec x)))
1
(-> "abc" .toUpperCase (.replace "B" "-"))
"A-C"
(-> {:x 1, :y 2} (assoc :z 3))
{:x 1, :y 2, :z 3}
(-> :z :y :x {:z {:y {:x 5}}})
nil
(doto (count "#_cheating heyho") (-> (= 5) (assert)))
16
(macroexpand '((-> [%] #(list %)) 10))
((-> [%] (fn* [%1] (list %1))) 10)
(macroexpand '(-> 1 inc dec (* 10)))
(* (dec (inc 1)) 10)
(-> 1 inc (as-> x (* x x)))
4