(->> [500 600 700] (map str) (map reverse) (apply str))
"(\\0 \\0 \\5)(\\0 \\0 \\6)(\\0 \\0 \\7)"
(->> [1 2 3] (map inc) (map (partial * 2)))
(4 6 8)
(defn f [l] (->> l (map :foo) (reduce 0 max)))
#'user/f
(-> {:foo 45} vals first (->> (assoc {:text "flarp"} :id)))
{:id 45, :text "flarp"}
(->> ["foo" "bar" "baz"] (map-indexed vector) (sort-by second (comp compare)))
([1 "bar"] [2 "baz"] [0 "foo"])
(macroexpand (quote (macroexpand '(->> [:foo :bar] cycle (take-nth 4)))))
(macroexpand (quote (->> [:foo :bar] cycle (take-nth 4))))
(->> (cons 1 [2]) (repeat 10000) (apply concat) (reduce +))
30000
(->> [1 3 5 6 8 10] (filter even?) first)
6
(->> (range 10) (map dec) (take-while #(< % 5)))
(-1 0 1 2 3 4)
(->> ["apple" "pear" "banana"] (interpose " a ") (apply str))
"apple a pear a banana"
(->> [1 2] ((juxt (comp dec first) (comp inc second))))
[0 3]
(->> (ns-publics 'clojure.core) keys (filterv #(re-find #"v$" (name %))))
[filterv reduce-kv mapv]
(->> (repeat \a) (take 10000) (reduce str) symbol name count)
10000
(macroexpand '(->> "one two" (-> (clojure.string/split #" ")) count))
(count (-> (clojure.string/split #" ") "one two"))
(->> [5 4 3 2 1] (drop 2) (take 3))
(3 2 1)
(->> (range 10) (map inc) (filter even?) (reduce + 0))
30
(->> [[8 9 4] [7 6 5]] (apply map vector))
([8 7] [9 6] [4 5])
(macroexpand-1 '(->> [1 2 3] #(* 2 %)))
(fn* [%1] (* 2 %1) [1 2 3])
(macroexpand '(->> (clojure.string/split "0.0;4e-4;1.2" #";") (map #(Float/parseFloat %))))
(map (fn* [%1] (Float/parseFloat %1)) (clojure.string/split "0.0;4e-4;1.2" #";"))
(macroexpand '(->> #(read-once prompt) repeatedly (drop-while pred) first))
(first (drop-while pred (repeatedly (fn* [] (read-once prompt)))))
(->> (all-ns) (mapcat (comp vals ns-interns)) (filter (comp :test meta)))
()
(->> "0221caf96a" (partition 2) (interleave (repeat \%)) flatten (apply str))
"%02%21%ca%f9%6a"
(macroexpand '(->> (range) (filter even?) (take 100) (reduce +)))
(reduce + (take 100 (filter even? (range))))
(->> "adsadasda" (partition-all 3) (interpose ["\n"]) (apply concat) (apply str))
"ads\nada\nsda"
(->> '(["x" "y"] ["x" "y"] ["x1" "y2"]) (into {}) (into ()))
(["x1" "y2"] ["x" "y"])
(->> (range) (reductions max 0) (drop-while (partial <= 5)) first)
0
(->> (range 90 100) (map inc) (map char) (apply str))
"[\\]^_`abcd"
(let [s "examples"] (->> s count dec (subs s 0)))
"example"
(-> 5 inc (range) (->> (map #(* % 2))))
(0 2 4 6 8 10)
(macroexpand '(->> (range) (filter even?) (take 10) (reduce +)))
(reduce + (take 10 (filter even? (range))))
(-> * (#(%)) inc (doto (->> (def foo))) inc)
3
(->> 1 (+ 1) (#(doto % prn)) (+ 1))
3
"2\n"
(clojure.walk/macroexpand-all '(->> foo (get-in ["foo" "bar"]) (get-in ["bar" "baz"])))
(get-in ["bar" "baz"] (get-in ["foo" "bar"] foo))
(-> 18 (Integer/toString 2) reverse (->> (apply str)) (Integer/parseInt 2))
9
(->> (range) (reductions max 0) (take-while (partial <= 5)) first)
nil
(->> (range 10) (map #(* % %)) (reduce +))
285
(macroexpand '(->> [1 2 3] reverse (partial apply vector)))
(partial apply vector (reverse [1 2 3]))
(->> #(inc (rand-int 6)) (repeatedly 4) rest (apply +))
13
(->> [[2 4] [4 343] [5 500]] (map second) max)
(4 343 500)
(->> 5 (#(/ % 3)) (#(+ 4 %)))
17/3
(->> 'clojure.core the-ns ns-map vals (map (comp :file meta)) distinct)
(nil)
(->> (* x x) (for [x (range 10)]) (map inc))
(1 2 5 10 17 26 37 50 65 82)
(->> (range) (filter even?) (drop 100) (map dec) (take 10))
(199 201 203 205 207 209 211 213 215 217)
(->> (range) (filter even?) (take 10) (#(nth % 4)))
8
(->> clojure.core quote ns-interns (filter (comp :private meta val)) count)
0
(->> (range 10) (map dec) (take-while #(< % 2)))
(-1 0 1)
(clojure.walk/macroexpand-all '(->> (range) (filter even?) (take 5) (reduce +)))
(reduce + (take 5 (filter even? (range))))
(->> (map #(* % %) (range 10)) (filter even?))
(0 4 16 36 64)
(-> + (apply [1 2 3 4]) (->> (* 7)))
70
(macroexpand-1 '(->> (range) (filter even?) (take 10) (reduce +)))
(reduce + (take 10 (filter even? (range))))