(def a true)
#'user/a
(def a 42)
#'user/a
(def a "not-a")
#'user/a
(def a 'foo)
#'user/a
(def a 32)
#'user/a
(def a (vector))
#'user/a
(def a "a")
#'user/a
(quote [a c])
[a c]
(def a (atom []))
#'user/a
(def a :foo)
#'user/a
(defn a [] "foo")
#'user/a
(def a 1)
#'user/a
(def a "string")
#'user/a
(let [a "test"])
nil
(defrecord Sparky [a])
#'user/Sparky
(def a [1 2 3])
#'user/a
(def a 4)
#'user/a
(def a *e)
#'user/a
(defn a [] "doc")
#'user/a
(quote (quote a))
(quote a)
(class '(a))
clojure.lang.PersistentList
(def a "kljdfklsdjf")
#'user/a
(def a #{})
#'user/a
(def a {:b {}})
#'user/a
(def a 30)
#'user/a
(quote ^:a a)
a
(meta '^:hey a)
{:hey true}
(let [a 0])
nil
(let [a "c" b (str a \= a) c (str b \& b)] c)
"c=c&c=c"
(let [a '(1 2 3)] (concat (take 1 a) [4] (drop 2 a)))
(1 4 3)
(for [[a b] '[[1 2 3 4] [A B C D]]] [b a])
([2 1] [B A])
(let [a '([:a 1] [:b 2])] (zipmap (map first a) (map second a)))
{:a 1, :b 2}
(let [eq? (fn [a] (let [b a] (identical? a b))) c 1000] (eq? c))
true
(let [a {:a 1, :b 2} b (with-meta a {:blah true})] (identical? a b))
false
(keep (fn [a] (when (#{:a :b} (first a)) a)) [[:a {}] [:b {}] [:c 1]])
([:a {}] [:b {}])
(let [a (atom 1) b (atom 2)] (reset! a b) (reset! b a) nil)
nil
(loop [[a b] (range)] (if (= 10 a) b (recur (map inc [a b]))))
11
(let [fliebels-rand-int (fn [a b] (+ a (rand-int (- b a))))] (fliebels-rand-int 10 12))
10
(let [a 1 b (inc a) c (+ a b) c (inc c)] c)
4
(take 20 (let [a (iterate inc 1)] (for [x a y a] [x y])))
([1 1] [1 2] [1 3] [1 4] [1 5] [1 6] [1 7] [1 8] [1 9] [1 10] [1 11] [1 12] [1 13] [1 14] [1 15] [1 16] [1 17] [1 18] [1 19] [1 20])
((fn [& {:keys [a b], :or {a 1, b 2}}] (+ a b)))
3
(let [a 23 b 20] (rem (min (- a b) (- b a)) 24))
-3
((fn [{:keys [a b], :as c, :or {a 1, b 2}}] [a b c]) {})
[1 2 {}]
(defn fibonacci [a b] (println a b (fibonacci (+ b 1) a + b)))
#'user/fibonacci
(let [a {:x 1} b (assoc a :y 10)] (println a) (println b))
nil
"{:x 1}\n{:x 1, :y 10}\n"
(let [a {} b (assoc a :foo 42) c (assoc b :bar "OK")] [a c])
[{} {:bar "OK", :foo 42}]
(defn within [a b p] (or (< a p b) (> a p b)))
#'user/within
(for [a (range 2) :let [b (inc a)] c (range b)] [a b c])
([0 1 0] [1 2 0] [1 2 1])
(let [a {:a 1, :b 0, :c 1}] (filterv #(= (a %) (apply max (vals a))) (keys a)))
[:a :c]
(reduce (fn [S a] (if (coll? a) (into S a) (conj S a))) #{} [:hello #{:hello :world} [:gogo :gadget]])
#{:gadget :gogo :hello :world}