(let [x "Dave"] (str "Hello, " x "!"))
"Hello, Dave!"(let [[name hp] ["Sgeo" 100 :foo]] [hp name])
[100 "Sgeo"]
(let [{v 3} [1 2 3 4]] v)
4(let [foo (list :a :b :c)] `(~@foo))
(:a :b :c)
(let [a (atom 1)] (swap! a inc) @a)
2(macroexpand (let [method 'foo] `(. bar ~method)))
(. user/bar foo)
(let [foo (transient [])] (conj! foo 1) (persistent! foo))
[1]
(macroexpand '(let [[s & r] 10] s))
(let [[s & r] 10] s)
(let [tf (list 3 4)] `(1 ~@tf))
(1 3 4)
(let [{a :a} {:a 1, :b 2}] a)
1(defmacro spy-env [] (let [km &env] `(prn ~km)))
#'user/spy-env
(defmacro get-file [] (let [f# *file*] `(str ~f#)))
#'user/get-file
(let [s (fn [x] (inc x))] (s 1))
2(let [[before cand after] [1 2 3]] after)
3(let [cf (constantly false)] (= cf (constantly false)))
false(let [v '(vec (1 2))] (first v))
vec(let [x {:foo 1}] {:a x, :b x})
{:a {:foo 1}, :b {:foo 1}}
(let [a 1 b 2] '{a b})
{a b}
(let [x :x] (keyword (str (name x) ".extended")))
:x.extended(let [xs (map println (range 10))] xs 1)
1(let [overrides {:foo :overridden}] (get overrides :bar :default))
:default(let [$ partial] (($ + 1) 2 3))
6(let [^"[B" x [1 2 3]] x)
[1 2 3]
(let [z 0] (meta '#^{:a :b} z))
{:a :b}
(let [[head & tail] (range 4)] [head tail])
[0 (1 2 3)]
(let [a 1 b (+ a 1)] b)
2(let [f (binding [*print-length* 100] (fn [] *print-length*))] (f))
20(let [x :foo {:keyss [x]} {:x 1}] x)
:foo(let [bar 3] `(foo ~`(bar ~bar)))
(user/foo (user/bar 3))
(let [f #(+ % 1)] (f 3))
4(let [[x y z] "foo"] [x y z])
[\f \o \o]
(do (let [&env 42] (defmacro forty-two [] &env)) (forty-two))
{}(let [[a b & c] (range 3 9)])
nil(let [numer first denom second] (denom [1 2]))
2(macroexpand '(let [x 1] (+ x x)))
(let [x 1] (+ x x))
(let [p true x (gensym) y (gensym)] `(let [~x 7 ~y 8] ~(if p x y)))
(clojure.core/let [G__77866 7 G__77867 8] G__77866)
(let [expr '(print i) i-value (reverse [1 2 3])] (eval `(let [~'i (quote ~i-value)] ~expr)))
nil"(3 2 1)"(let [foo (take 5 (repeatedly #(do (println "boo") 1)))] (println "foo") (let [bar (seq foo)] (println "bar")))
nil"foo\nboo\nbar\n"(let [[a b c] (range)] [c a b])
[2 0 1]
(defmacro test [& code] (let [i 1] ~code))
#'user/test
(let [{{:keys [n]} :m} {:m {:n 42}}] n)
42(let [f (binding [*clojure-version* 10] (fn [] *clojure-version*))] (f))
{:incremental 1, :major 1, :minor 11, :qualifier "SCI"}
(let [cmd '(f x)] `(~@cmd x#))
(f x x__132861__auto__)
(let [{{world :world} :hello} {:hello {:world 3}}] world)
3(let [from-hex #(Integer/parseInt % 16)] (from-hex "fa7"))
4007(let [m {:foo 1, :bar 2}] (seq m))
([:foo 1] [:bar 2])
(let [[a b c] nil] [a b c])
[nil nil nil]
(let [a 1 b 2] '(a b))
(a b)
(let [m# #(+ %1 2)] (class m#))
sci.impl.fns$fun$arity_1__26688(let [x (bean [])] (prn (class x)) (:foo x))
nil"clojure.core.proxy$clojure.lang.APersistentMap$ff19274a\n"

