(doseq [a [1 2 3] :when a] a)
nil
(let [a 4 b (inc a)] [a b])
[4 5]
(let [a (atom :atom)] [a (deref a) @a])
[#object [clojure.lang.Atom 0x31155973 {:status :ready, :val :atom}] :atom :atom]
(let [a 0 b (inc a)] [a b])
[0 1]
(do (defonce a 1) (defonce a 2) a)
1
(let [a [:a] b a] (identical? a b))
true
(let [a {:a (atom 0)}] (= a (do (swap! (:a a) inc) (println a) a)))
true
"{:a #object[clojure.lang.Atom 0x703dee58 {:status :ready, :val 1}]}\n"
(let [a 0xf000] (if (< a 0x8000) a (- a 0x8000)))
28672
(defn foo ([a] {:pre [(pos? a)]} (inc a)) ([a b] {:pre [(= 15 (+ a b))]} (- a b)))
#'user/foo
(defn rrgcd [a b] (loop [a a b b] (if (= a 0) b (recur (rem b a) a))))
#'user/rrgcd
((fn f ([a] (f nil a)) ([b a] [a b])) 1 2)
[2 1]
(loop [a 10] (do (prn a) (if (pos? a) (recur (dec a)))))
nil
"10\n9\n8\n7\n6\n5\n4\n3\n2\n1\n0\n"
((fn this ([a] (this a 1)) ([a b] (+ a b))) 3)
4
(let [a 1 b (inc a)] (+ a a b b b))
8
(for [a (range 2) c (range (inc a))] [a (inc a) c])
([0 1 0] [1 2 0] [1 2 1])
((fn fn-name [a] (if (odd? a) (fn-name (inc a)) (str a))) 1)
"2"
(for [a (range 20) :while (< a 10) :when (odd? a)] a)
(1 3 5 7 9)
(loop [a 0] (if (>= a 5) a (recur (+ a 1))))
5
((fn foo ([a] (foo a 1)) ([a b] (+ a b))) 2)
3
(let [{a :a, :or {a "nope"}} 1] a)
"nope"
(let [a (atom 4)] (swap! a inc) (prn a) (swap! a + 10) (prn a))
nil
"#object[clojure.lang.Atom 0xf71769d {:status :ready, :val 5}]\n#object[clojure.lang.Atom 0xf71769d {:status :ready, :val 15}]\n"
(let [a 3] print a)
3
(if-let [a 'b] a 'd)
b
(defn test-fxn [a] (println a))
#'user/test-fxn
(def myfn (fn [a] a))
#'user/myfn
(let [a 1] (println a))
nil
"1\n"
(let [a {}] (meta ^:a a))
nil
(defn f [a] (.lenght a))
#'user/f
((fn [a] (println a)) 1)
nil
"1\n"
(type (for [a (range)] a))
clojure.lang.LazySeq
(defn f [{:keys [a]}] a)
#'user/f
(quote (let [a 1] a))
(let [a 1] a)
(let [a 1] '(a))
(a)
(= '(a) '(a))
true
(macroexpand-1 '(fn [a] a))
(fn [a] a)
(quote (let* [a 1] a))
(let* [a 1] a)
(defprotocol A (a [x y]))
{:methods #{#object [clojure.lang.MultiFn 0x474b0eb9 "clojure.lang.MultiFn@474b0eb9"]}, :name user/A, :ns #object [sci.impl.vars.SciNamespace 0x37a47b18 "user"], :sigs {:a {:arglists ([x y]), :doc nil, :name a}}}
(let [a [:b :c]] a)
[:b :c]
(defn f [a] (- a))
#'user/f
(-> [a 1] (let a))
1
(let [[a b] nil] a)
nil
(meta (fn xyz [a] a))
nil
(let [a 5 c] a)
5
(let [[a b c] []] a)
nil
(defprotocol A (do-a [a] ""))
{:methods #{#object [clojure.lang.MultiFn 0x2b1890e7 "clojure.lang.MultiFn@2b1890e7"]}, :name user/A, :ns #object [sci.impl.vars.SciNamespace 0x37a47b18 "user"], :sigs {:do-a {:arglists ([a]), :doc "", :name do-a}}}
(def a (take 2 a))
#'user/a
(let [a 10] (println a))
nil
"10\n"
(let [a 10] (var a))
10
(let [a 3] (hash-set a))
#{3}
(-> [a 5] (let a))
5