(let [x 5] `(+ 1 ~x))
(clojure.core/+ 1 5)
(let [a (delay (+ 1 2))] @a)
3
(let [x (atom 5)] `(do ~@x))
(do 5)
(let [x (map prn (range 2))] "foo")
"foo"
(let [[h & t] [1]] [h t])
[1 nil]
(let [tell-bahman-hi #(println "Hi Bahman!")] (tell-bahman-hi))
nil
"Hi Bahman!\n"
(let [x [:tr (when false [:td])]] x)
[:tr nil]
(let [x 5 y (inc x)] y)
6
(let [a 1 a (inc a)] a)
2
(let [overrides {:foo :overridden}] (:bar overrides :default))
:default
(let [^String x (identity "test")] (.length x))
4
(let [f 1] (macroexpand-1 `(inc ~f)))
(clojure.core/inc 1)
(let [x '+] `(~x 2 3))
(+ 2 3)
(let [xs (map println (range 10))] xs)
(nil nil nil nil nil nil nil nil nil nil)
"0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n"
(let [f' (fn [x] x)] (f' 1))
1
(let [m {:k 4}] (:k m inc))
4
(let [rest identity] (rest [1 2 3]))
[1 2 3]
(let [map! [{} #{} [] {[] #{}}]] (map map? map!))
(true false false true)
(let [a 2 s 'a] (prn s))
nil
"a\n"
(let [a (atom 0)] (swap! a inc))
1
(macroexpand '(let [a b] (f x)))
(let [a b] (f x))
(let [nana (identity Double/NaN)] (= nana nana))
true
(macroexpand (quote (let [[id [x y]] fn-args])))
(let [[id [x y]] fn-args])
(let [q '((a b) ())] (first q))
(a b)
(let [a 1] `(n ~a d))
(user/n 1 user/d)
(let [foo '()] [(first foo) (rest foo)])
[nil ()]
(let [my-atom (atom {:0 1})] (:0 @my-atom))
1
(let [[a & b] [1]] (class b))
nil
(let [nat? (partial >= 0)] (nat? 0.5))
false
(let [x 5] (> 6 x 1))
true
(let [x 1] (if true x) 2)
2
(let [x (Object.)] {:a x, :b x})
{:a #object [java.lang.Object 0x6a0d2097 "java.lang.Object@6a0d2097"], :b #object [java.lang.Object 0x6a0d2097 "java.lang.Object@6a0d2097"]}
(let [rg (set (range 50000))] (count rg))
50000
(let [x (keys [1 2 3])] 1)
1
(->> a (+ 5) (let [a 5]))
10
(let [foo nil] (if foo "truthy" "falsy"))
"falsy"
(let [id "foo"] [(keyword (str "div#" id))])
[:div#foo]
(do (let [x 5] (println "foo") x))
5
"foo\n"
(let [a 10] (inc a) #_=> 'eleventy)
eleventy
(let [x 42 f (fn [] x)] (f))
42
(let [o (Object.)] [(str o) (.hashCode o)])
["java.lang.Object@7aca1d8" 128754136]
(let [cf (constantly false)] (= cf cf))
true
(let [x 42 x (inc x)] x)
43
(let [returns-its-arg (fn [x] x)] (returns-its-arg "HAAAA"))
"HAAAA"
(let [a (atom 1)] (= a a))
true
(let [{foo :foo} (hash-map :foo :bar)] foo)
:bar
(let [foo ['foo 1]] (with-redefs ~foo clojure.core/unquote))
[foo 1]
(let [{a :foo} (seq [:foo :bar])] a)
:bar
(let [x 1.123] (< 1.0 x 1.2))
true
(let [{:as foo} '(:foo 3)] foo)
{:foo 3}