(#(let [a (last %&)] (a)) #(println 1))
nil"1\n"(let [x 2 y x x 3] [x y])
[3 2]
(defmacro bogo-let [bindings & body] `(let ~bindings ~@body))
#'user/bogo-let
(let [{:keys [foo bar]} {:bar 22, :foo 1}] foo)
1(let [coll '(1 2 3)] `(~@coll 4))
(1 2 3 4)
(let [x 'a y 'b] `(+ ~x ~y))
(clojure.core/+ a b)
(let [a (atom 0)] (defn f [] (swap! a inc)))
#'user/f
((fn [param] (let [new-val (- param 1)] new-val)) 1)
0(let [a (int-array '(1 2 3))] (alength a))
3(let [v [1 3 5]] (map v [1 2]))
(3 5)
(let [x (cons 1 (cons 2 nil))] (second x))
2(let [[a :as b c :as d] (range 5)])
nil(let [a :x] (case a :z 1 :x 2))
2(let [[:as [:as [:as foo]]] [0 1 2]] foo)
[0 1 2]
(let [a `(typereff nil)] (= (first a) 'typereff))
false(let [{:keys [a b]} {:name "Joe", :age 30}] a)
nil(let [a 0 f (fn [] a) a 1] (f))
0(let [xs (range 5)] (pr-str (reduce conj xs xs)))
"(4 3 2 1 0 0 1 2 3 4)"(let [[x y z] (repeatedly rand)] [x y z])
[0.583456119157425 0.4528808235626657 0.1751528342677764]
(let [bytes (range 12)] (map reverse (partition 4 bytes)))
((3 2 1 0) (7 6 5 4) (11 10 9 8))
(let [{:as p} '(1 2 3 4)] p)
{1 2, 3 4}
(let [[a [[b]]] [[1 [2 [3 4]]]]] [a b])
[[1 [2 [3 4]]] nil]
(let [x (map println (range 4))] (dorun x) true)
true"0\n1\n2\n3\n"(macroexpand-1 '(let [{:or {x 1}, x :x} {}] x))
(let [{x :x, :or {x 1}} {}] x)
(let [z 0] (meta (quote #^{:a :b} z)))
{:a :b}
(defmacro bleh [var-name] (let [a# var-name] `(println ~a#)))
#'user/bleh
(let [{x :x, :or {x 2}} {:x nil}] x)
nil(let [[bigger smaller] ((juxt inc dec) 10)] [bigger smaller])
[11 9]
(let [v [1 2 3]] (v (dec (count v))))
3(let [t (transient {})] (assoc! t :hello :world) (persistent! t))
{:hello :world}
(let [foo "bar" foo (if foo "baz" foo)] foo)
"baz"(let [[a b] [(+ 2 3) \a]] [a b])
[5 \a]
(let [[first-thing & rest-of-it] '[sword bread]] [first-thing rest-of-it])
[sword (bread)]
(let [foo (rest [1 2 3 4])] (reverse foo))
(4 3 2)
(let [{x :foo} '(:foo 100 :bar 200)] x)
100(let [c (transient {})] (assoc! c :a 1) (persistent! c))
{:a 1}
(let [up [0 -1]] (map + up [42 66]))
(42 65)
(let [m 3] (partition 2 1 [0] (range m)))
((0 1) (1 2) (2 0))
(let [count (atom 0)] (defn counter [] (swap! count inc)))
#'user/counter
(let [stuff [1 2 3]] `["hi" ~@stuff "there"])
["hi" 1 2 3 "there"]
(let [nr (comp #(Integer/parseInt %) str)] (nr 1 000 000))
100(let [do 5] (do (println do) (+ do do)))
10"5\n"(let [x 5] (cond-> x (even? x) (+ 1)))
5(let [m {:a 10} [[k v]] (seq m)] k)
:a(let [a (promise)] (deliver a 0) (deliver a 1))
nil(let [the-map {:atom (atom 1)}] (swap! (:atom the-map) inc))
2(let [ys (list 1)] (identical? (seq (lazy-seq ys)) ys))
true(let [p [1 2 3]] (zipmap p (rest p)))
{1 2, 2 3}
(let [eq? (fn [a] (identical? a a))] (eq? 1000))
true(let [foo false] (if (not (nil? foo)) "truthy" "falsy"))
"truthy"

