(-> "crocket" reverse reverse (#(apply str %)))
"crocket"
(macroexpand-1 '(-> :a (fn [x] (str x))))
(fn :a [x] (str x))
(-> "\ud834\udd1e" (.substring 0 1) (.codePointCount 0 1))
1
(-> 31 char str re-pattern str first int)
31
(-> cdr a is car other my quote)
(my (other (car (is (a cdr)))))
(map #(-> % name symbol) [:key1 :key2])
(key1 key2)
(-> "a" ((fn [x] (println "static string") x)))
"a"
"static string\n"
(-> 3 (+ 5) (doto prn) (+ 10))
18
"8\n"
(for [p #{[2] [3]}] (-> p first))
(3 2)
(-> 3 (+ 4) (+ 1) (quot 3))
2
(-> '(and a b c d) macroexpand-1)
(and a b c d)
(-> {:a {:b {:c 5}}} :a :b :c)
5
((fn [foo] (-> foo meta :name keyword)) #'+)
:+
(-> 5 (doto println) inc (doto println) inc)
7
"5\n6\n"
(-> clojure.repl/source var meta ((juxt :file :line :source)))
[nil nil nil]
(-> :3 name first int (- (int \0)))
3
(mapcat #(-> %) {1 2, 3 4})
(1 2 3 4)
(-> 1 (+ 1) (+ 1) (+ 1))
4
(-> [x (range 5)] (for (/ x 2)))
(0 1/2 1 3/2 2)
(defmacro fn-> [& forms] `#(-> % ~@forms))
#'user/fn->
(macroexpand '(-> ["one"] first (str "_") keyword))
(keyword (str (first ["one"]) "_"))
(reduce #(-> %2) '(1 2 3))
3
(macroexpand '(-> 1 #(+ % 1)))
(fn* 1 [%1] (+ %1 1))
(macroexpand-1 '(-> map var .sym name first))
(first (name (.sym (var map))))
(-> {:a {:b (range)}} :a :b (nth 0))
0
(defn remoteeval [request] (-> request :params :expression load-string))
#'user/remoteeval
(macroexpand '(-> 4 (a (1 4 4))))
(a 4 (1 4 4))
(clojure.walk/macroexpand-all '(-> a (b 1) (c 2)))
(c (b a 1) 2)
(macroexpand '(-> 1 (f x y z)))
(f 1 x y z)
(macroexpand '(-> (fn [] foo) ((fn [f] (f)))))
((fn [f] (f)) (fn [] foo))
(macroexpand '(-> [foo] ((fn [x] (print x)))))
((fn [x] (print x)) [foo])
(macroexpand '(-> 1 #(+ 1 %)))
(fn* 1 [%1] (+ 1 %1))
(-> {:lat 1, :long 2} ((juxt :lat :long)))
[1 2]
(-> {"aa" "a", "bb" "b"} (assoc "bb" "test"))
{"aa" "a", "bb" "test"}
(clojure.walk/macroexpand-all '(-> 1 (+ 1) (* 2)))
(* (+ 1 1) 2)
(for [x [[3] {3 3} #{3} '(3)]] (= (-> x empty class) (-> x empty rest class)))
(false false false true)
(-> 1 inc (as-> n (* n n)))
4
(-> {:a {:b {:c 1}}} :a :b :c)
1
(macroexpand '(-> "/etc/password" File. FileReader. BufferedReader. line-seq))
(line-seq (BufferedReader. (FileReader. (File. "/etc/password"))))
(defn foo [s] (-> ^String s .length .longValue))
#'user/foo
(macroexpand-1 '(-> x (fn [y] (inc y))))
(fn x [y] (inc y))
(macroexpand '(-> c (+ 3) (* 2)))
(* (+ c 3) 2)
(clojure.walk/macroexpand-all '(-> e d c b a))
(a (b (c (d e))))
(macroexpand-1 '((-> 1 (fn [x] (inc x)))))
((-> 1 (fn [x] (inc x))))
(-> [1 2 3] (#(map inc %)))
(2 3 4)
(macroexpand-1 '(-> ["one"] first (str "_") keyword))
(keyword (str (first ["one"]) "_"))
(-> {:foo {:bar {:baz 3}}} :foo :bar :baz)
3
(macroexpand '((-> 1 (fn [x] (inc x)))))
((-> 1 (fn [x] (inc x))))
(macroexpand-1 '(-> foo #(* % 2)))
(fn* foo [%1] (* %1 2))
(let [foo map] (-> foo var meta :arglists))
nil