(let [andf (comp (partial every? identity) list)] (andf true true))
true(let [x (atom {})] (do (swap! x assoc :a 1) @x))
{:a 1}
(let [xs [1 2 3]] (assert (must (every? odd? xs))))
nil(let [x (range 1)] (if (rest x) x (first x)))
(0)
(let [$ (fn [f x] (f x))] ($ inc 1))
2(let [f (fn make-remover [prefix] {:pre false} :whut)] (f "okay"))
:whut(let [[h & t] [1 2 3 4 5]] t)
(2 3 4 5)
(let [f (fn [x] (+ 1 x))] (-> 2 f))
3(let [a 1 a (inc a) a (inc a)] a)
3(let [x "foo" y (str "fo" "o")] (identical? x y))
false(let [a 1 b 2 a 3] (+ a b))
5(let [[a b c] [1 2]] (list a b c))
(1 2 nil)
(let [something-outside nil] (get-in {:a :b, :c :d} nil ::not-found))
{:a :b, :c :d}
(let [{:keys [b]} {:b {:a 0}} {:keys [a]} b] a)
0(let [m {:a 1}] (update-in m [:a] (fnil inc 0)))
{:a 2}
(let [[a b] (re-matches #"abc" "abc")] [:a a :b b])
[:a \a :b \b]
(defn read-only-deffable [val] (let [p (promise)] (deliver p val) p))
#'user/read-only-deffable
(let [x (seq (to-array [2 1]))] [(sort x) (seq x)])
[(1 2) (2 1)]
(let [[_ a b c] (clojure.string/split "d,a,b,c" #",")] [a b])
["a" "b"]
(let [[first & rest] (range 5)] {:first first, :rest rest})
{:first 0, :rest (1 2 3 4)}
(let [foo #(apply + %)] (foo '(2 3)))
5(let [{a :a, :as m} [5 3]] (println a m))
nil"nil [5 3]\n"(let [my-set #{:node-1 :node-3} item :node-4] (my-set item))
nil(let [a 0 b (inc a) c (inc b)] c)
2(let [<-? 2 *_' 3] (+ <-? (* <-? *_')))
8(let [[a b c d] (range)] [a b c d])
[0 1 2 3]
(let [+ *] `(1 2 3 (+ 1 1)))
(1 2 3 (clojure.core/+ 1 1))
(let [x (filter odd? [2 4])] (when (first x) x))
nil(let [p (promise)] (deliver p 1) (deliver p 1) @p)
1(let [x [[1 2] [3 4]]] (apply map vector x))
([1 3] [2 4])
(let [andf (comp (partial every? identity) list)] (andf true false))
false(defmacro eval-expr [vars vals expr] `(let [~vals ~vars] ~expr))
#'user/eval-expr
(let [c (with-meta [] {:very :special})] (binding [*print-meta* true] (pr c)))
nil"^{:very :special} []"(let [myproc-2 (fn [f] (f "a") (f "b"))] (myproc-2 print))
nil"ab"(let [do-math (juxt + - * /)] (do-math 10 20))
[30 -10 200 1/2]
(let [get-result [{:status 200}]] (if (vector? get-result) get-result (vector get-result)))
[{:status 200}]
(defmacro aif [condition & body] `(let [~'it condition] ~@body))
#'user/aif
(defmacro with-hello [f] `(let [msg# "Macro"] (println msg#) ~f))
#'user/with-hello
(let [my-set #{:node-1 :node-3} item :node-3] (my-set item))
:node-3(let [x (fn [])] (= x (vary-meta x assoc :a 'bc)))
false(let [has-key? contains?] (has-key? #{:a 1 :b 2} :a))
true(let [x '((println 1) (println 2))] `(do ~@x))
(do (println 1) (println 2))
(let [cmd #(+ %1 %1 %2)] (cmd 3 4))
10(let [a (repeat 2 (transient []))] (identical? (first a) (second a)))
true(let [map (fn [f coll] (identity coll))] (map int "whee"))
(119 104 101 101)
(let [x ^{:doc "yes!"} (fn [_] "no!")] (meta x))
{:doc "yes!"}
(let [f (apply partial + (range 5))] (f 42 72))
124(let [[a b :as x] [1 2 3 4]] x)
[1 2 3 4]
(let [swap (fn [[a b]] [b a])] (swap [1 2]))
[2 1]
(let [a 1 b (inc a)] {:a a, :b b})
{:a 1, :b 2}

