(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))]
((fn [a b & [more]] [a b more]) 1 2 {:a 1, :b 2} 3 4)
[1 2 {:a 1, :b 2}]
(let [[a b [c d e]] [1 2 [3 4 5]]] [a b c d e])
[1 2 3 4 5]
(re-matches #"(?x)a b #well, this is a very cool pattern, don't you think?" "ababab")
nil
(let [a {:b [:c :d]}] (let [[x [y z]] (first (seq a))] (println x y z)))
nil
":b :c :d\n"
(mapv (fn [a b] [(+ 2 a) (+ 2 b)]) [1 2 3] [4 5 6])
[[3 6] [4 7] [5 8]]
(let [[x [a & os]] (list 10 (range 3))] (* x (+ a (apply / os))))
5N
(apply hash-map (mapcat (fn [[a b]] [a (+ b 1)]) {:a 1, :b 2, :c 3}))
{:a 2, :b 3, :c 4}
(->> [1 2 3 4] (partition 2 1) (every? (fn [[a b]] (== (inc a) b))))
true
(map (fn [[_ a b]] (or a b)) (re-seq #"([^\",]+)|\"(.*?)\"" "34HD1209,ADSK,\"-2,539\",\"-83,203\",25,0,0"))
("34HD1209" "ADSK" "-2,539" "-83,203" "25" "0" "0")
(let [{:keys [a b], :as m} {:a 1, :b 2}] (-> m (assoc :c (inc a))))
{:a 1, :b 2, :c 2}
(some (fn [x] (when (re-find #"foo" x) x)) ["this is a bar" "this is a foo"])
"this is a foo"
(let [[a b c d] (map inc [1 2 3 4])] (println a b c d))
nil
"2 3 4 5\n"
(let [{:keys [a b c], :or [1 2 3]} {:a 5, :b 6}] [a b c])
[5 6 nil]
(let [a (promise) b (list* 1 2 3 (lazy-seq @a))] (deliver a b) (take 20 b))
(1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2)
(let [[_ a b _ c] '(1 2 3 4 5)] (println a b c))
nil
"2 3 5\n"
(let [{a 3, b 0, c 5} [1 2 3 4 5 6]] [a b c])
[4 1 6]
(macroexpand-1 '(for [a [1 2] b [3 4] c [5 6]] (+ a b c)))
(clojure.core/let [iter__28685__auto__ (clojure.core/fn iter__984026 [s__984027] (clojure.core/lazy-seq (loop [s__984027 s__984027] (clojure.core/when-first [a s__984027] (clojure.core/let [iterys__28681__auto__ (clojure.core/fn iter__984028 [s__984029] (clojure.core/lazy-seq (loop [s__984029 s__984029] (clojure.core/when-first [b s__984029] (clojure.core/let [iterys__28681__auto__ (clojure.core/f...
(let [[a b] (split-with (partial not= 2) [1 2 2 2 1])] (concat a (rest b)))
(1 2 2 1)
(let [{:keys [a b], :as m} {:a 1, :b 2}] (-> m (assoc :b (inc a))))
{:a 1, :b 2}
(let [[prefix > a b c] [1 2 3 4 5 6]] [prefix a b c])
[1 3 4 5]
(take 10 (rest (map first (iterate (fn [[a b]] [(+ a b) (inc b)]) [0 1]))))
(1 3 6 10 15 21 28 36 45 55)
(apply (fn [a b & r] [a b (map identity (take 3 r))]) (iterate inc 0))
[0 1 (2 3 4)]
(map (comp (partial take 2) (partial take-last 3)) '[[a b c] [wrong a b c]])
((a b) (a b))
(defn merge-rows [a b] (map + (map #(apply max %) (partition 2 1 a)) b))
#'user/merge-rows
(let [[f & a] '(* 5 3)] [(apply * '(5 3)) (apply f a)])
[15 3]
(let* [vec__6245 [1 2] a (clojure.core/nth vec__6245 0 nil) b (clojure.core/nth vec__6245 1 nil)] [a b])
[1 2]
(let* [vec__2842 (quote (1 2)) a (clojure.core/nth vec__2842 0 nil) b (clojure.core/nth vec__2842 1 nil)] a)
1
(let [a (atom [10 20 30 40])] (println @a) (swap! a assoc 2 99) (println @a))
nil
"[10 20 30 40]\n[10 20 99 40]\n"
((fn [& {:keys [a b c], :or {c 42}}] [a b c]) :a 1 :b 2)
[1 2 42]
(let [[a b c] [[1 2 3] [4 5 6] [7 8 9]]] (reduce + a))
6
(let [[a b] (split-with (partial not= 3) [1 2 3 4 5])] (concat a (rest b)))
(1 2 4 5)
(keep (fn [[a b]] (if (even? b) a)) (map vector [1 2 3] [4 5 6]))
(1 3)
((fn ([a] 1) ([b c] 2)) :one-arg)
1
(defrecord Foo [a b c d e])
#'user/Foo
(let [a 1 a' (inc 1)] a')
2
(some #{'b} '(a b c))
b
(let [a 'foo] `(* 2 ~a))
(clojure.core/* 2 foo)
(macroexpand '(let [[a & r] s]))
(let [[a & r] s])
(some #{'*} '[- a +])
nil
(defn compare-doubles [a b] (rand-nth [1 -1]))
#'user/compare-doubles
(do (def a) (def b) (def c))
#'user/c
(def a (delay (do (println "realizing") 42)))
#'user/a
(macroexpand '(let (a b) (c d)))
(let (a b) (c d))
(list? (list* (set '(a b c))))
false
(macroexpand-1 '(->> x (a b c)))
(a b c x)
(when-let [[a b] (seq [1 2])] b)
2
(let [[a b c] [1 2 3]])
nil
(map second '((a 1) (b 2)))
(1 2)
(defn f [a & args] (class args))
#'user/f