(let [[h & t] (range 1 5)] (inc h))
2(macroexpand '(let [[a b] [1 2]] [a b]))
(let [[a b] [1 2]] [a b])
(let [[x y] [1 2 3]] (+ x y))
3(let [{:keys [a b]} #{:a :b}] [a b])
[:a :b]
(let [[_ extension] (re-matches #".*\.(.+)" "word.json")] extension)
"json"(let [sel :x] (-> {:x 5} sel (* 2)))
10(defn bb [] (let [b (fn [] 1)] (eval (list b))))
#'user/bb
(let [x 5 y 4] `(+ ~x ~y))
(clojure.core/+ 5 4)
(defmacro a [& b] `(let [b# ~b] b#))
#'user/a
(let [[c r] '(:a :b)] (str c r))
":a:b"(let [x (range 5)] (reduce (comp flatten vector) x))
(0 1 2 3 4)
(let [p (promise)] (deliver p 1) (deliver p 1))
nil(let [a 1 b 2] [[a b] [1 2]])
[[1 2] [1 2]]
(let [x '(1 2 3)] `[~'x ~@x])
[x 1 2 3]
(defn z [dict] (let [sym (:param dict)] (ns sym)))
#'sym/z
(let [s (first "D5") r (last "D5")] [s r])
[\D \5]
(let [sss "TODAY=123\nNOT_TODAY=456\nTODAY=abc"] (doall (re-seq #"^TODAY=(.*)" sss)))
(["TODAY=123" "123"])
(let [frob (partial + 42)] (map frob (range 4)))
(42 43 44 45)
(macroexpand '(let [[x :as all] nil] [x all]))
(let [[x :as all] nil] [x all])
(let [boring (fn [x] (+ 2 x))] (boring 3))
5(let [x 5] ((fn [percent] (< percent x)) 2))
true(type (let [a (/ 1 3)] (/ a a)))
clojure.lang.BigInt(let [x 0 y x x y] [x y])
[0 0]
(let [[a b c] (clojure.string/split "a,b,c" #",")] [a b])
["a" "b"]
(let [s "NULL"] (if (= s "NULL") nil s))
nil(let [a (atom {})] (:name (swap! a assoc :name "test")))
"test"(let [{:as m} '(1 2 3 4)] m)
{1 2, 3 4}
(let [[a b] (for [x ["1" "2"]] (Integer/parseInt x))])
nil(let [f (fn [] 3)] `(1 2 ~(f)))
(1 2 3)
(let [s "foops"] (condp = s "foo" "Win" "Lose"))
"Lose"(let [f (fnil inc 1)] [(f 10) (f nil)])
[11 2]
(let [idx (take 10 (repeatedly #(rand-int 1000)))] idx)
(149 678 979 916 322 682 294 618 84 7)
(let [cmds (range 5)] `{:yours ~cmds, :mine [~@cmds]})
{:mine [0 1 2 3 4], :yours (0 1 2 3 4)}
(defmacro callme [f] (let [f# ~f] (if f# (f#))))
#'user/callme
(let [w "reduce"] (-> w symbol resolve meta (#'clojure.repl/print-doc)))
nil"-------------------------\nclojure.core/reduce\n([f coll] [f val coll])\n f should be a function of 2 arguments. If val is not supplied,\n returns the result of applying f to the first 2 items in coll, then\n applying f to that result and the 3rd item, etc. If coll contains no\n items, f must accept no arguments as well, and reduce returns the\n result of calling f with no arguments. If col...
(let [a (transient {})] (identical? a (assoc! a :b :c)))
true(let [f (with-meta + (meta #'+))] [f (meta f)])
[#object[clojure.lang.AFunction$1 0xce82050 "clojure.lang.AFunction$1@ce82050"] {:ns #object[sci.impl.vars.SciNamespace 0x71bde97b "clojure.core"], :name +, :sci/built-in true, :arglists ([] [x] [x y] [x y & more]), :doc "Returns the sum of nums. (+) returns 0. Does not auto-promote\n longs, will throw on overflow. See also: +'", :sci.impl/inlined #object[clojure.core$_PLUS_ 0x35b52c2b "clojure.c...
(let [p (promise)] (deliver p :foo) (deliver p :bar))
nil(let [points [1 2 3]] (map points [1 2]))
(2 3)
(let [[a b] '(1 2)] (+ a b))
3(let [a {:a 1}] (assoc a :b 2) a)
{:a 1}
(let [x [1 2 3 4]] (apply + x))
10(defmacro mylet [v & body] `(let ~v ~@body))
#'user/mylet
(macroexpand '(let [if 3] (and 1 2 3)))
(let [if 3] (and 1 2 3))
(->> (+ x y) (let [x 1 y 2]))
3(let [xs '(1 2 3)] (apply + xs))
6(let [first "1" second (str first "2")] (println second))
nil"12\n"(let [fc (constantly [1 2 {:a 1}])] (fc 5))
[1 2 {:a 1}]
(let [n 'foo] `(~(symbol (str "." n))))
(.foo)
(let [x (seq (range 10))] (identical? x (seq x)))
true

