(take 5 (for [a (range 10) b (range 10) c (range 10)] [a b c b a]))
([0 0 0 0 0] [0 0 1 0 0] [0 0 2 0 0] [0 0 3 0 0] [0 0 4 0 0])
(loop [a () b [1 2 3]] (if (empty? b) a (recur (conj a (peek b)) (pop b))))
(1 2 3)
(let [c (map (fn overflow [a] (overflow a)) [1])] 5)
5
(let* [a :a b :a] (hash-map a 1 b 2))
{:a 2}
(remove '#{a b nil} '[a b c nil])
(c nil)
(for [[a b] [[1 2 3 4]]] (list b a))
((2 1))
(let [a (atom {:a {:b 1}})] (reset! a 2) @a)
2
(let [a {:foo [10 20 30]}] (get-in a [:foo 1]))
20
(let [a 0 b (inc a) b (inc b)] b)
2
(do (require 'clojure.walk) (clojure.walk/macroexpand-all '(quote (let [a 1] a))))
(quote (let [a 1] a))
(let [[a b c] [1 2]] (list a b c))
(1 2 nil)
(let [{:keys [b]} {:b {:a 0}} {:keys [a]} b] a)
0
(for [a [1 2] b [2 3]] [a b])
([1 2] [1 3] [2 2] [2 3])
(let [[a b] (re-matches #"abc" "abc")] [:a a :b b])
[:a \a :b \b]
(let [[_ a b c] (clojure.string/split "d,a,b,c" #",")] [a b])
["a" "b"]
(let [{a :a, :as m} [5 3]] (println a m))
nil
"nil [5 3]\n"
(let [a 0 b (inc a) c (inc b)] c)
2
(let [[a b c d] (range)] [a b c d])
[0 1 2 3]
(defn contains-map [a b] (= (select-keys a (keys b)) b))
#'user/contains-map
(= 9 ((fn [a b] (+ a b)) 4 5))
true
(defn str-plus [a b] (+ (Integer/parseInt a) (+ (Integer/parseInt b))))
#'user/str-plus
(let [swap (fn [[a b]] [b a])] (swap [1 2]))
[2 1]
(def make-id (let [a (atom 0)] (fn [] (swap! a inc))))
#'user/make-id
(let [y +] (defn x [a b] (y a b)))
#'user/x
((fn [[a b c]] (+ a b)) [2 3 4])
5
(let [{:keys [a b c], :or {a 1, b 2, c 3}} {:a 10}] [a b c])
[10 2 3]
(for [a (range 3) b (range 2) :when (> (+ a b) 1)] {:a a, :b b})
({:a 1, :b 1} {:a 2, :b 0} {:a 2, :b 1})
(let [a {:a 0, :b 1}] (= a (select-keys {:a 0, :b 1, :c 2} (keys a))))
true
(let [_cons (fn [a b] (fn [c] (c a b))) car (fn [c] (c (fn [a b] a))) cdr (fn [c] (c (fn [a b] b)))] (cdr (_cons 1 nil)))
nil
(let [_cons (fn [a b] (fn [c] (c a b))) car (fn [c] (c (fn [a b] a))) cdr (fn [c] (c (fn [a b] b)))] (car (_cons 1 nil)))
1
(def a "doc" 1)
#'user/a
(defrecord B [^A a])
#'user/B
(def a (int 1000000))
#'user/a
(defmacro a [x] `'~x)
#'user/a
(class "not a function")
java.lang.String
(defrecord bla [a b])
#'user/bla
(defn a ([x] x))
#'user/a
(def a (atom [1]))
#'user/a
(def a {:x :y})
#'user/a
(symbol? '[a 1])
false
(defrecord A [^B b])
#'user/A
(def a #uuid "538ba7b2-5034-4146-a1d0-884eebfce27f")
#'user/a
(into {} '[[a 1]])
{a 1}
(macroexpand-1 '(Collections/shuffle a))
(Collections/shuffle a)
(str '(a "a"))
"(a \"a\")"
(defn a [] {:key "bob"})
#'user/a
(let [a 5] #'a)
5
(first `'[a 1])
quote
(defrecord My-rec [a b])
#'user/My-rec
(print "I'm a n00by")
nil
"I'm a n00by"