(->> ["1" "3" "4" "s"] (filter #(re-matches #"\d+" %)) (map #(Integer/parseInt %)))
(1 3 4)
((fn f [x] (->> (repeatedly rand) (take-while #(< % x)) (map f))) 0.93)
((() () (())) () () () () () ((()) () (() (())) () () ()) () () () () (() ((()))) (() () ()) (()) (()) ((() ()) (() () ((() () (()))) ((()) () () ((()) ()) () () (() (())) () (() () () (()) () () () (())) (() (())) (()) () () () () (() () () () ()) ()) ((() () (()) (()) (() (())) (())) () ((()) ()) () (()) ((() ())) () ()) () () (()) (())) () ((()) (())) () () () () ((())) () () () (() ()) () () (...
(->> 'clojure.core ns-publics keys (map name) (filter #(.endsWith % "?")) (clojure.string/join " "))
"decimal? contains? every? qualified-keyword? satisfies? seq? fn? vector? thread-bound? any? isa? boolean? char? some? inst? simple-symbol? pos? sequential? neg? reduced? float? set? reversible? bound? map? var? empty? string? uri? double? map-entry? int? associative? keyword? even? tagged-literal? extends? indexed? counted? zero? simple-keyword? not-every? class? neg-int? sorted? nil? instance? b...
((fn f [x] (->> (repeatedly rand) (take-while #(< % x)) (map f))) 0.9)
((() (() (((()))) ()) ()) ())
(->> ["1_2" "b_c" "3_4"] (map #(clojure.string/split % #"_")) (map (partial zipmap [:a :b])))
({:a "1", :b "2"} {:a "b", :b "c"} {:a "3", :b "4"})
(defn correct-answer-for [q] (->> q (reverse) (apply str) (read-string) (name) (reverse) (apply str) (read-string)))
#'user/correct-answer-for
(->> (for [x (range 1 11) :let [y (/ 1 x)]] y) (map class))
(java.lang.Long clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio)
(->> '([(1 2) (12 34)] [(3 4) (5 6)]) (mapcat (partial map vec)))
([1 2] [12 34] [3 4] [5 6])
(->> (all-ns) (mapcat ns-publics) keys (map name) (filter (partial re-find #"re-")) (clojure.string/join " "))
"re-groups re-seq re-pattern compare-and-set! re-matcher *clojure-version* ensure-reduced re-find re-matches clojure-version re-quote-replacement"
(defn uniformize-random-bits [bits] (->> bits (partition 2) (keep {[0 1] 0, [1 0] 1})))
#'user/uniformize-random-bits
(defn get-parent [file-path] (->> file-path reverse (drop-while #(not= \/ %)) reverse (apply str)))
#'user/get-parent
(->> (range 10) (map-indexed vector) (remove #(zero? (mod (first %) 4))) (map second))
(1 2 3 5 6 7 9)
(->> [{:foo 1} {:foo 2} {:foo 3}] (filter #(= (:foo %) 2)) first)
{:foo 2}
(macroexpand '(->> [[1 2 3] [4 5 6] [7 8 9]] 2 1))
(1 (2 [[1 2 3] [4 5 6] [7 8 9]]))
(defn palindrome? [num] (let [s (str num)] (= s (->> s reverse (apply str)))))
#'user/palindrome?
(->> (all-ns) (mapcat ns-publics) keys (map name) (filter (partial re-find #"^re-")) (clojure.string/join " "))
"re-groups re-seq re-pattern re-matcher re-find re-matches re-quote-replacement"
(->> (transient {:a (transient [1])}) (persistent!) (map (fn [[k v]] [k (persistent! v)])) (into {}))
{:a [1]}
(->> [["one" 1]] ((fn [coll] (doseq [[f i] coll] (printf "%s %s%n" f i)))))
nil
"one 1\n"
(defn partition-when [p c] (->> c (partition-by p) (partition-all 2) (map (partial apply concat))))
#'user/partition-when
(->> (ns-publics 'clojure.core) keys (filter #(= \? (last (str %)))) (clojure.string/join " "))
"decimal? contains? every? qualified-keyword? satisfies? seq? fn? vector? thread-bound? any? isa? boolean? char? some? inst? simple-symbol? pos? sequential? neg? reduced? float? set? reversible? bound? map? var? empty? string? uri? double? map-entry? int? associative? keyword? even? tagged-literal? extends? indexed? counted? zero? simple-keyword? not-every? class? neg-int? sorted? nil? instance? b...
(->> '([(1 2) (12 34)] [(3 4) (5 6)]) (mapcat (partial map vector)))
([(1 2)] [(12 34)] [(3 4)] [(5 6)])
(let [s "[^[][['+\ufeff\\"] (->> s (map (comp (partial format "\\u%04x") int)) (apply str)))
"\\u005b\\u005e\\u005b\\u005d\\u005b\\u005b\\u0027\\u002b\\ufeff\\u005c"
(->> [2 5 4 1 3 6] (drop 2) (take 3) (map inc) (apply +))
11
(->> (map (fn [[k v]] [k (fn? (var-get v))]) (ns-interns *ns*)) (filter second) (map first))
()
(defn unique-y-with-higher-x [hashes] (->> hashes (group-by :y) (vals) (map (fn [more-hashes] (apply max-key :x more-hashes)))))
#'user/unique-y-with-higher-x
(conj (->> (map :a [{:a 1} {:a 2}]) (filter #(= 1 %))) 2)
(2 1)
(->> [1 2 3 4 5] (#(print %& "\n") 6 7 8 9))
nil
"(6 7 8 9 [1 2 3 4 5]) \n"
(let [delim "^"] (clojure.string/split "hello^world" (re-pattern (->> delim first int (format "%04x") (str "\\u")))))
["hello" "world"]
(->> ["val1 key1" "val2 key2" "val3 key1"] (map #(reverse (clojure.string/split % #" "))))
(("key1" "val1") ("key2" "val2") ("key1" "val3"))
(->> [1 2 2 44444 5 6 2 2] frequencies (apply max-key second) first)
2
(->> (map (juxt first rest next) [() [] #{} {} nil]) (apply =) (iterate true?) (take 3))
(true true true)
(->> "make this into bigrams" (#(.split %1 "\\s+")) (partition 2 1) (map vec))
(["make" "this"] ["this" "into"] ["into" "bigrams"])
(let [x '[a b c d e]] (->> x count rand-int (nth x)))
c
(->> ((juxt identity #(partition 2 %) #(partition 3 %)) (range 9)) (apply concat))
(0 1 2 3 4 5 6 7 8 (0 1) (2 3) (4 5) (6 7) (0 1 2) (3 4 5) (6 7 8))
(->> (ns-interns *ns*) (map (fn [[k v]] [k (fn? (var-get v))])) (filter second) (map first))
()
(->> {:a 2, :b 1, :d 4} (map (fn [[k v]] [k (- v)])) (into {}))
{:a -2, :b -1, :d -4}
(let [m {:three 3, :five 4, :four 4}] (->> m seq (apply max-key second) first))
:four
(macroexpand '(->> x second (-> @bot :config :prepends first str) (assoc irc-map :message) registry/try-handle))
(registry/try-handle (assoc irc-map :message (-> (clojure.core/deref bot) :config :prepends first str (second x))))
(->> (for [[n v] (ns-publics 'clojure.core)] [n (count (:doc (meta v)))]) (sort-by second >) (ffirst))
add-watch
(->> (all-ns) (mapcat ns-publics) keys (map name) (filter #(.startsWith % "re-")) (clojure.string/join " "))
"re-groups re-seq re-pattern re-matcher re-find re-matches re-quote-replacement"
(->> {:a {:b 0}, :c {:d {:e 1}}} (tree-seq coll? seq) (filter map?) (mapcat keys))
(:a :c :b :d :e)
(let [delim "^"] (str "[" (->> delim first int (Integer/toHexString) (str "\\u")) "]"))
"[\\u5e]"
(->> [2 5 4 1 3 6] (drop 2) (take 3) (map inc) (reduce +))
11
(->> [1 true false nil] (map (juxt (comp not not) boolean)) (every? (partial apply =)))
true
(->> (range 100) shuffle (take 8) (map #(vector %2 %1) (cycle [1 -1])) (into {}))
{5 1, 11 -1, 23 -1, 41 -1, 63 1, 81 -1, 82 1, 83 1}
(->> (ancestors (class 1)) (clojure.set/union (ancestors (class (bigint 1)))) (clojure.set/difference (ancestors (class (/ 5 2)))))
#{}
(->> (range 20) (take-while #(< % 10)) (filter odd?) (map #(/ % 2)))
(1/2 3/2 5/2 7/2 9/2)
(->> {:30000 [{:request 1, :values 2} {:request 2, :values 3}]} vals first (map :request))
(1 2)
(->> clojure.core quote the-ns ns-publics seq rand-nth val meta ((juxt :name :doc)) (map println) dorun)
nil
"drop-last\nReturn a lazy sequence of all but the last n (default 1) items in coll\n"
(macroexpand '[(-> (a b) (c d) (e f)) (->> (a b) (c d) (e f))])
[(-> (a b) (c d) (e f)) (->> (a b) (c d) (e f))]