(macroexpand-1 '(let [foo [1 2 3]] `(do ~@foo)))
(let [foo [1 2 3]] (clojure.core/sequence (clojure.core/seq (clojure.core/concat (clojure.core/list (quote do)) foo))))
(let [{bar :bar, :as stuff} {:bar 1, :foo 2}] stuff)
{:bar 1, :foo 2}
(let [x 1 x (inc x) x (inc x)] x)
3(let [s "examples"] (->> s count dec (subs s 0)))
"example"(let [a (atom nil)] (reset! a a) (deref a) nil)
nil(let [x [1 2 3]] (if (coll? x) x [x]))
[1 2 3]
(let [{:keys [a b]} {:a 1, :b 2}] [b a])
[2 1]
(let [x (transient [1 2 3])] (persistent! (conj! x 1)))
[1 2 3 1]
(let [ihaveamap {:foo nil, :bar nil}] (assoc ihaveamap :bar 100))
{:bar 100, :foo nil}
(let [[x & nums] [1 2 3 4]] [x nums])
[1 (2 3 4)]
(let [m {:a 1, :b 2}] (assoc m :a 3))
{:a 3, :b 2}
(let [{:keys [t1 t2]} {:x "hello", :y "goodbye"}] [t1 t2])
[nil nil]
(let [a {:foo [10 20 30]}] (-> a :foo first))
10(defn f [& ls] (let [[x & xs] ls] x))
#'user/f
(let [candidates [] n 42] (if (seq candidates) (first candidates) n))
42(let [[f & a] [* 5 3]] (apply f a))
15(let [{{baz :baz} :foo} {:foo {:bar "a", :baz "b"}}] baz)
"b"(let [x [[:c :d] [:e :f]]] `[[:a :b] ~@x])
[[:a :b] [:c :d] [:e :f]]
(let [foo []] (and (seq foo) (apply assoc {:a 42} foo)))
nil(defmacro mac [] `(let [x# [1 2 3]] (first x#)))
#'user/mac
(let [x [1 2]] `(= 3 ~(count x)))
(clojure.core/= 3 2)
(let [x "foo boo FOO Boo"] (re-seq #"(?i)f\w*" x))
("foo" "FOO")
(let [x (with-meta [1] {:a 1, :b 2})] (meta x))
{:a 1, :b 2}
(let [xs [1 2 3]] `(foo a ~xs b))
(user/foo user/a [1 2 3] user/b)
(let [a "s"] (case (class a) 'java.lang.String :found (class a)))
java.lang.String(let [a 1] (condp = a 1 "Hey" 2 "Yo"))
"Hey"(let [[a b c] [1 2 3]] [b a c])
[2 1 3]
(let [t Object v 2] (with-meta {:value v} {:type t}))
{:value 2}
(let [a (range 1 12)] (format "%s" (apply list a)))
"(1 2 3 4 5 6 7 8 9 10 11)"(defmacro fun [& body] `(let [~'name (javax.swing.JLabel. "hi")] ~@body))
#'user/fun
(let [f (fn [& args] (first args))] (apply f (range)))
0(let [{{x :x} :a} {:a {:x "deep"}, :b 0}] x)
"deep"(let [f concat] (f '(1 2) '(3 4)))
(1 2 3 4)
(let [[a & [b]] [1 2 3 4 5]] b)
2(let [{{:keys [first]} :name} {:name {:first "john", :last "smith"}}] first)
"john"(let [m 6 n 8] (repeatedly m #(rand-int n)))
(7 6 5 3 7 0)
(let [a 0 b (fn [] a) a 1] [a (b)])
[1 0]
(let [[a & rest :as all] [1 2 3]] all)
[1 2 3]
(let [args '("foo" "bar")] `(blah ~(vec args)))
(user/blah ["foo" "bar"])
(let [[x & xs] (sorted-map 1 2 3 4)] nil)
nil(defmacro m [x] (let [f (fn [] (println x))] `(~f)))
#'user/m
(let [{[subneuron & _] :neurons} {:neurons [:magic 2 3]}] subneuron)
:magic(let [v (with-local-vars [x 1] x)] (with-bindings {v 2} @v))
2(let [s "k1=v1=k2=v2;"] (apply hash-map (clojure.string/split s #"[=;]")))
{"k1" "v1", "k2" "v2"}
(let [a 2] (condp = a 1 "Hey" 2 "Yo"))
"Yo"(let [[[a b] c] [[1 2] 3]] [a b c])
[1 2 3]
(let [x 5] `(do ~x `(foo bar ~x)))
(do 5 (clojure.core/sequence (clojure.core/seq (clojure.core/concat (clojure.core/list (quote user/foo)) (clojure.core/list (quote user/bar)) (clojure.core/list user/x)))))
(let [a (range 1 12)] (format "Values: %s" (str a)))
"Values: (1 2 3 4 5 6 7 8 9 10 11)"(let [inf (* 2 Double/MAX_VALUE)] (> (* inf inf) inf))
false(let [[x y] (seq #{1 2})] (+ x y))
3

