(let [po :foo] `(defn example [~'xs] [~po ~'po]))
(clojure.core/defn user/example [xs] [:foo po])
(let [s '#{a b c d}] (s 'e))
nil(let [a (transient {})] (assoc! a :a a) (persistent! a))
{:a #object [clojure.lang.PersistentArrayMap$TransientArrayMap 0x1431d537 "clojure.lang.PersistentArrayMap$TransientArrayMap@1431d537"]}
(let [[a b] [1 2 3 4]] [a b])
[1 2]
(defmacro with-foo [& body] `(let [~'foo 3] ~@body))
#'user/with-foo
(macroexpand '(let [[x y] (range 2)] [y x]))
(let [[x y] (range 2)] [y x])
(let [x (to-array [2 1])] [(sort x) (seq x)])
[(1 2) (1 2)]
(let [{:keys [a b]} #{:a :c}] [a b])
[:a nil]
(let [[foo & bar] [1 2 3]] [foo bar])
[1 (2 3)]
(let [f (fn [x] x) g f] (g 1))
1(let [x '(2 3)] (identical? x (seq x)))
true(let [kvpair (first {1 2})] (identical? kvpair (vec kvpair)))
false(let [{foo :foo, :as bar} {:foo 1}] [foo bar])
[1 {:foo 1}]
(let [a "s"] (case (class a) 'java.lang.String :found :not-found))
:not-found(let [s ['cool 'yay]] (zipmap (map keyword s) s))
{:cool cool, :yay yay}
(let [[& {:as opts}] [1 2 3 4]] opts)
{1 2, 3 4}
(let [dbl #(* 2 %)] (-> 42 dbl))
84(let [a (Double/valueOf Double/NaN)] (identical? (.doubleValue a) (.doubleValue a)))
false(let [x (delay (rand 10))] (into [] [@x @x @x]))
[5.997451406147707 5.997451406147707 5.997451406147707]
(defn func [param] (let [new-val (- param 1)] new-val))
#'user/func
(let [a {:a 1}] [(assoc a :b 2) a])
[{:a 1, :b 2} {:a 1}]
(let [[a b c] (range 3)] [c b a])
[2 1 0]
(let [l '(foo ^:key surname)] (meta (second l)))
{:key true}
(let [separate (juxt filter remove)] (separate even? (range 10)))
[(0 2 4 6 8) (1 3 5 7 9)]
(let [kw ::example] (str (namespace kw) "/" (name kw)))
"user/example"(let [a (if (> (rand) 0.49) 42 :else)] a)
42(defmacro mc [x] `(let [y ~(resolve x)]))
#'user/mc
(let [x nil y :not-nill] (prn x y) :result)
:result"nil :not-nill\n"(let [n Double/POSITIVE_INFINITY] (condp = n Double/POSITIVE_INFINITY "yes" "no"))
"yes"(let [x (list (list))] (some #{(first x)} x))
()(let [boing (atom nil)] (swap! boing assoc 1 2))
{1 2}
(let [x 10] (- x 4) (- x 6))
4(let [x #{}] (if-not (seq x) [] (conj x 10)))
[](let [hash-args [:foo :bar :bat :baz]] `(hash-map ~@hash-args))
(clojure.core/hash-map :foo :bar :bat :baz)
(defn f [foo] (let [foo2 (some-fn foo)] (println foo2)))
#'user/f
(let [- = _ 1] (-> (- _ -)))
false(let [v [1 2 3]] (identical? v (vec v)))
true(let [val (get {:a 1, :b 2} :a)] val)
1(let [a (atom {:a {:b 1}})] (reset! a 2))
2(let [x 1 y 2] `(+ ~x ~y))
(clojure.core/+ 1 2)
(let [f (fn [x] (x))] (f #(pr 'foo)))
nil"foo"(defmacro foo [& body] `(let [f 3] ~@body))
#'user/foo
(let [f (partial + 1) x 5] (f x))
6(let [f (fn [] 3)] '(1 2 ~(f)))
(1 2 (clojure.core/unquote (f)))
(let [x :foo y :foo] {x 1, y 2})
{:foo 2}
(macroexpand '(let [{:keys [a b]} somemap] [a b]))
(let [{:keys [a b]} somemap] [a b])
(let [x 1 f (fn [] x) x 2] (f))
1(let [stuff-not-done (for [x (range 10)] (println x))] 10)
10(let [a {:a 1, :b 2}] (= a a))
true(let [x (promise)] (deliver x 1) (deliver x 2))
nil

