(let [x 1 y 1] (= x y 1))
true(let [x '(His Shadow)] `(I Worship ~@x))
(user/I user/Worship His Shadow)
(let [{a 0, b 1} [:foo :bar]] [b a])
[:bar :foo]
(let [x (fn [] (+ 2 3))] (+ 1 (x)))
6(let [arg "foo"] (cond-> arg (not (vector? arg)) (vector)))
["foo"]
(let [[x y] [1 [2 3 4]]] [x y])
[1 [2 3 4]]
(let [a {:one 1, :two 2}] (a :one :two))
1(let [r (rand)] (repeat 5 {:a 0, :b r}))
({:a 0, :b 0.9114629883939864} {:a 0, :b 0.9114629883939864} {:a 0, :b 0.9114629883939864} {:a 0, :b 0.9114629883939864} {:a 0, :b 0.9114629883939864})
(do (def x 1) (let [^Long y x] y))
1(let [int-c (comp (partial + -48) int)] (int-c \0))
0(let [[one :as all] [1 2 3]] [one all])
[1 [1 2 3]]
(let [[a b & cs] (vec (range 200000))] cs)
(2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 1...
(defmacro run [expr] `(let [expr# ~expr] (inc expr#)))
#'user/run
(let [[_ x y] [1 2 3]] [x y])
[2 3]
(let [f #(println *ns*)] (f) (in-ns 'clojure.core) (f))
nil"#object[sci.impl.vars.SciNamespace 0x37a47b18 user]\n#object[sci.impl.vars.SciNamespace 0x71bde97b clojure.core]\n"(let [{:keys [foo bar]} {:foo 1, :bar 2}] foo)
1(let [v [1 2 3]] (identical? v (seq v)))
false(let [info count] (-> {:name "Foo", :age 12} info))
2(let [{:keys [name age]} {:name "Joe", :age 30}] age)
30(let [x 1] (apply + x [2 3 4]))
10(do (defmacro x [] (println &env)) (let [blah 3] (x)))
nil"{blah G__3428304}\n"(let [x [Double/NaN]] [(= x x) (= x [Double/NaN])])
[true false]
(defmacro get-var [f] `(let [~'out (var ~f)] ~'out))
#'user/get-var
(let [[& [k v]] (seq {:key 'val})] [k v])
[[:key val] nil]
(let [x "foo"] [(identical? x x) (identical? x "foo")])
[true false]
(let [s '#{a b c d}] (s 'c))
c(let [a (map prn (range 5))] (dorun a) :hi)
:hi"0\n1\n2\n3\n4\n"(let [a (atom true)] (defn spinner [] (swap! a not)))
#'user/spinner
(let [x nil] (remove #{x} [nil nil nil]))
(nil nil nil)
(let [counter (atom 1)] (defn unuque-int [] (swap! counter inc)))
#'user/unuque-int
(let [inp [:a 3]] (repeat (second inp) (first inp)))
(:a :a :a)
(let [x [1 2 3]] `(foo ~x bar))
(user/foo [1 2 3] user/bar)
(let [a {:abc-one 1, :abc-two 2}] (a (keyword "abc-one")))
1(macroexpand '(let [[a b] '(1 2)] a))
(let [[a b] (quote (1 2))] a)
(let [x '(print :changed)] (cons 'not-print (next x)))
(not-print :changed)
(let [f (fn [x] (str x))] (-> :a f))
":a"(let [x (drop 3 (iterate inc 1))] (println "foo"))
nil"foo\n"(defmacro with-trouble [& body] `(let [~'x 5] ~@body))
#'user/with-trouble
(let [x true] (if x (print "false") (print "false")))
nil"false"(let [a '(typereff nil)] (= (first a) 'typereff))
true(let [x (short 0)] ((sorted-map 0 "zero") (int x)))
"zero"(let [{x :foo} '[:foo 100 :bar 200]] x)
nil(let [x '(fn [#^String y] (count y))] x)
(fn [y] (count y))
(quote `(let [a b] ~@(fn [a] a)))
(clojure.core/sequence (clojure.core/seq (clojure.core/concat (clojure.core/list (quote clojure.core/let)) (clojure.core/list (clojure.core/vec (clojure.core/sequence (clojure.core/seq (clojure.core/concat (clojure.core/list (quote user/a)) (clojure.core/list (quote user/b))))))) (fn [a] a))))
(let [m {"a" 1}] [(m "a") (get m "a")])
[1 1]
(macroexpand '(let [[_ _ _] [1 2 3]]))
(let [[_ _ _] [1 2 3]])
(let [[& {a :a}] {:foo 10, :bar 20}] a)
nil(let [f (fn [x] (* x 2))] (f 13))
26(let [fname 'map?] `(prn ~(meta (resolve fname))))
(clojure.core/prn {:ns #object [sci.impl.vars.SciNamespace 0x71bde97b "clojure.core"], :name map?, :sci/built-in true, :arglists ([x]), :doc "Return true if x implements IPersistentMap"})
(let [do-something (fn [arg1 _] arg1)] (do-something 3 300))
3

