(let [a 2 b (delay a)] @b)
2
(do (def a 1) (deref (var a)))
1
(defn f [a b] (+ a b))
#'user/f
(let [[a :as numbers] (range 5)] a)
0
(letfn [(x [a] (inc a))] (x 5))
6
(macroexpand '(-> [a 5] (let a)))
(let [a 5] a)
((fn [{:keys [a b]}] a) {:a 2})
2
(let [a 'G__1963] (prn (gensym)) (prn a))
nil
"G__1238078\nG__1963\n"
(defn try-to-acquire [a] (compare-and-set! a false true))
#'user/try-to-acquire
(defn f [a b] (and a b))
#'user/f
((fn [& a] (println a)) :a 1)
nil
"(:a 1)\n"
(let [a 1 b 2] [a b])
[1 2]
(let [{a :a} (seq [:a :A])] a)
:A
(let [a 1 b (inc a)] b)
2
(defn plus [a b] (+ a b))
#'user/plus
((fn [& {:keys [a]}] a) :a 3)
3
(defn add [a b] (+ a b))
#'user/add
(let [{a 'a} {'a 'a}] (type a))
clojure.lang.Symbol
(let [{:strs [a]} {"a" 41}] (inc a))
42
(let [[a b] [1 2]] [b a])
[2 1]
(let [[a] (range)] [a a a a])
[0 0 0 0]
(macroexpand '(fn [[a b]] [b a]))
(fn [[a b]] [b a])
(let [{a :a} '(:a 2)] a)
2
(defn tuple [a b] [:tuple a b])
#'user/tuple
(let [a 0 b 1] a b)
1
(let [[a & b] nil] [a b])
[nil nil]
(for [a [{:foo 1}] b a] b)
([:foo 1])
(map (fn [a] a) [1 2 3])
(1 2 3)
((fn [{a :a}] (inc a)) {:a 41})
42
(trampoline (fn [a] [1 a 3]) 2)
[1 2 3]
((fn [[a b]] [a b]) [1 2])
[1 2]
(let [a 10] (inc a) #_=> 11)
11
((fn [a b] [a b]) 1 2)
[1 2]
(def foo (let [a 1] (inc a)))
#'user/foo
(do (def a 1) @(var a))
1
(if-let [a (+ 1 2)] a :not-a)
3
(do (def a 1) (+ 1 a))
2
(defn y [a b] (+ a b))
#'user/y
(defmacro f ([a] a) ([] `(f 1)))
#'user/f
(defn split [a b] (.split a b))
#'user/split
(defn foo [^Long a] (* 2 a))
#'user/foo
(let [a (atom 0)] (swap! a inc))
1
(defn sum [a b] (+ a b))
#'user/sum
(->> a (+ 5) (let [a 5]))
10
(macroexpand '(for [a (range 5)] a))
(clojure.core/let [iter__28685__auto__ (clojure.core/fn iter__1364855 [s__1364856] (clojure.core/lazy-seq (loop [s__1364856 s__1364856] (clojure.core/let [s__1364856 (clojure.core/seq s__1364856)] (clojure.core/when s__1364856 (if (clojure.core/chunked-seq? s__1364856) (clojure.core/let [c__28683__auto__ (clojure.core/chunk-first s__1364856) size__28684__auto__ (clojure.core/int (clojure.core/coun...
(let [a 10] (inc a) #_=> 'eleventy)
eleventy
(let [f (fn ([a] {:pre [(integer? a)]} (+ a 10)) ([a b] {:pre [(integer? a) (integer? b)]} (+ a b)))] [(f 1 2) (f 1)])
[3 11]
(let [a (transient {})] (dotimes [i 20] (assoc! a i i)) (persistent! a))
{0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6, 7 7}
(defn max-by [f a b] (if (pos? (f a b)) a b))
#'user/max-by
(let [a 1 b (+ a a) c (* b b)] c)
4