(let [f (fn [] #"foo")] (= (f) (f)))
true
(let [[a :as numbers] (range 5)] numbers)
(0 1 2 3 4)
(let [] (def x 1) (def y x))
#'user/y
(let [[Map<String String>] [1 2]] [Map<String String>])
[1 2]
(let [x 2] (< 1 x 3))
true
(let [my-fun vector?] (str (:name (meta my-fun))))
""
(#(let [%2 2] %2) 1 1)
2
(let [x 1 x´ (inc x)] x´)
2
(let [n 0] #{n (do n)})
#{0}
(let [? "snowman"] (.replace ? "w" "?"))
"sno?man"
(let [if 3] (and 1 2 3))
3
(let [name 'baz] `(def ~name 1))
(def baz 1)
(let [[a & [b]] [1 2]] b)
2
(map int "(let [; 1])")
(40 108 101 116 32 91 894 32 49 93 41)
(clojure.walk/macroexpand-all '(quote (let [a 1] a)))
(quote (let [a 1] a))
(eval '(let [n *ns*] (println n)))
nil
"#object[sci.impl.vars.SciNamespace 0x37a47b18 user]\n"
(let [thesym "funngames"] (eval `(println ~thesym)))
nil
"funngames\n"
(let [fn-name 'foo] `(don't-def ~fn-name [] nil))
(user/don't-def foo [] nil)
(let [x (map println (range 4))] true)
true
(let [x (fn [] (fn [] (fn [] "hi")))] (((x))))
"hi"
(defn x [] (let [fun (fn [] 1)] (fun)))
#'user/x
(let [im {}] (map-indexed #(let [i %1 p %2] (assoc im p i)) [:x :y :z]) im)
{}
(let [my-name "Konstantinos"] (println "hello" my-name "!"))
nil
"hello Konstantinos !\n"
(let [my-vec [1 2 3]] (my-vec 1))
2
(let [x 5] `(foo bar ~x))
(user/foo user/bar 5)
(let [s 1 s (inc s)] s)
2
(let [s "<v11:ID id=\"93\"/>"] (println s) s)
"<v11:ID id=\"93\"/>"
"<v11:ID id=\"93\"/>\n"
(let [r (range)] (first r) (realized? r))
true
(let [[h & t] "hello"] [h t])
[\h (\e \l \l \o)]
(let [d (Double/parseDouble "NaN")] (.equals d d))
true
(let* [a 1] (let [b 2] 3))
3
(let [fn [1 2 3]] (fn 2))
3
(let [dbval 1] [:h1 dbval] [:h2 dbval])
[:h2 1]
(let [double-inc (comp inc inc)] (double-inc 2))
4
(let [a 10] (inc a) #_=> 11)
11
(let [x 1 y 1] [x y])
[1 1]
(let [x {:a 1}] (read-string (pr-str x)))
{:a 1}
(let [[x y] [1 :a]] {x y})
{1 :a}
(let [foo 1 foo 2] [foo foo ])
[1 2]
(def foo (let [a 1] (inc a)))
#'user/foo
(let [a 1] (eval `(inc ~a)))
2
(let [string_var "test"] (str "blah" string_var "\"/>"))
"blahtest\"/>"
(let [my-vec []] (meta #^{:foo 'bar} my-vec))
nil
(let [and +] (and 1 2 3))
6
(let [a '(1 1)] `(~a))
((1 1))
(let [v [1 2 3]] (v 1))
2
(let [string_var "var"] (str "a\"" string_var "\"/>"))
"a\"var\"/>"
(let [string "HELLO"] (= (.toUpperCase string) string))
true
(let [x 1 x′ (inc x)] x′)
2
(let [seq (range 10)] `(do ~@seq))
(do 0 1 2 3 4 5 6 7 8 9)