(let [[a b] [1 2]] (+ a b))
3
(let [a (map prn (range 5))] a :hi)
:hi
(let [c 17] (quote (a b ~c d)))
(a b (clojure.core/unquote c) d)
(let [[x y] [1 2]] (+ x y))
3
(let [my-map {:keyword1 "value1", 'symbol2 "value2"}] ('symbol2 my-map))
"value2"
(let [list '(1 2 3)] (namespace 'list))
nil
(let [x 3 x (+ x 5)] x)
8
(let [{a :a} @(atom {:a 42})] a)
42
(let [n Double/POSITIVE_INFINITY] (case n Double/POSITIVE_INFINITY "yes" "no"))
"no"
(let [x #_(inc 1) (dec 1)] x)
0
(let [n 0] `#{~n ~(do n)})
#{0}
(let [a (atom :atom)] [a (deref a) @a])
[#object [clojure.lang.Atom 0x31155973 {:status :ready, :val :atom}] :atom :atom]
(let [x "\ufeffPersonnelNbr"] (= (read-string (pr-str x)) x))
true
(let [a 0 b (inc a)] [a b])
[0 1]
(let [a 1] `[1 2 a ~a])
[1 2 user/a 1]
(let [-> concat] (-> [1 2] [3 4]))
(1 2 3 4)
(let [a 1 b 2] (do 3 4))
4
(let [x (atom 7)] (swap! x inc) @x)
8
(let [foo 1 bar 2] (+ foo bar))
3
(let [x 1 y 2 x 3] x)
3
(defmacro foo [] (let [f 1] (prn (keys &env))))
#'user/foo
(let [l '(1 2 3)] (first l))
1
(defmacro log [f] (let [x# ((resolve f))] x#))
#'user/log
(macroexpand '(let [[x y] (range 2)] x))
(let [[x y] (range 2)] x)
(let [x 5] (#(< % x) 2))
true
(let [x (atom 5)] (reset! x 7) @x)
7
(let [x 1 y (+ x 1)] y)
2
(defn foo [] (let [s {:foo '("hello")}] s))
#'user/foo
(let [inc #(+ % 10)] (inc 2))
12
(let [x :foo {a x} {:foo 1}] a)
1
(let [third (double 1/3)] (+ third third third))
1.0
(let [x 1 y x z y] z)
1
(let [value true] (and value (assoc {} :test value)))
{:test true}
(let [e 'for] (prn (macroexpand-1 '(doc e))))
nil
"^{:line 1, :column 36} (doc e)\n"
(let [x "something"] (str "Hello, " x "Dave"))
"Hello, somethingDave"
(let [s "Hello World"] (println s) (prn s))
nil
"Hello World\n\"Hello World\"\n"
(let [{:as p} [1 2 3 4]] p)
[1 2 3 4]
(let [x (symbol " ")] `(var ~x))
(var)
(let [x 1 x (+ x 1)] x)
2
(let [a [:a] b a] (identical? a b))
true
(let [inc #(+ %10)] `(inc 2))
(clojure.core/inc 2)
(let [a :foo] (case a :foo (println "YES")))
nil
"YES\n"
(let [f "hello"] `(f ~f 'f ~'f))
(user/f "hello" (quote user/f) f)
(let [x "yay" y (println (str "yo"))] x)
"yay"
"yo\n"
(let [x {}] (do (assoc x :a 1) x))
{}
(let [{{bar :bar} :foo} {:foo {:bar 'baz}}] bar)
baz
(let [shit-head? #(= "chord" %)] (shit-head? "chord"))
true
(let [fun "map"] (meta (ns-resolve 'clojure.core (symbol fun))))
{:ns #object[sci.impl.vars.SciNamespace 0x71bde97b "clojure.core"], :name map, :sci/built-in true, :arglists ([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]), :doc "Returns a lazy sequence consisting of the result of applying f to\n the set of first items of each coll, followed by applying f to the\n set of second items in each coll, until any one of the colls is\n exhausted. Any rem...
(let [a (apply str (range 1e4))] (count a))
38890
(let {a b, 5 6} (+ a b))
11