((fn rgcd [a b] (if (= a 0) b (rgcd (rem b a) a))) 3 4)
1
(def a {})
#'user/a
(defn a [])
#'user/a
(defrecord A [])
#'user/A
(def a [])
#'user/a
(def a)
#'user/a
(doseq [a [0 1 2] :when (even? a)] (println a))
nil
"0\n2\n"
(defn tst [{:keys [a b], :or {a 1}}] (println a b))
#'user/tst
(defn foo [x f a] (if a (f x a) x))
#'user/foo
((fn [{:keys [a b], :or {a 3, b 4}}] [a b]) {})
[3 4]
(let [a (atom 0)] (list (swap! a inc) (swap! a inc)))
(1 2)
(defmacro foo ([a] (foo a 2 3)) ([a b] (foo a b 3)) ([a b c] `(+ ~a ~b ~c)))
#'user/foo
(-> '[win lose lose] (as-> [a b c] [b a c] [c b a] [a c b] [b c a]))
[lose win lose]
(let [{a :foo} '(:foo :bar)] a)
:bar
(let [[a b] [1 2]] [a b])
[1 2]
(defn f [a] (.divide 1M a nil))
#'user/f
(let [a (partial + 2)] (a 2))
4
(let [[a b] "1"] (list b a))
(nil \1)
(let [[a & b] [1]] a b)
nil
(let [a 5] `(a b c))
(user/a user/b user/c)
(defn x [a b] (prn a b))
#'user/x
(defn bar [a b] (+ a b))
#'user/bar
(defn unique [a] (sort (into () (set a))))
#'user/unique
((fn [_ a] (a)) 42 (fn [] 23))
23
(let [x 1 a (inc x)] a)
2
(not= (defrecord Foo [a]) (defrecord Foo [a]))
false
(do (def a 1) (def a 2))
#'user/a
(let [a 1 b 2] [a b])
[1 2]
(defn myfunc [a b] (* a b))
#'user/myfunc
(defn test [a b] (+ a b))
#'user/test
(let [a {} b {}] {a 1, b 2})
{{} 2}
(defn add [a b] (* a b))
#'user/add
(defmulti can-share? (fn [a b] (type a)))
#'user/can-share?
(clojure.walk/macroexpand-all '(quote (let [a 1] a)))
(quote (let [a 1] a))
(macroexpand '(with-open [a FOO] (dostuff a)))
(clojure.core/let [a FOO] (try (clojure.core/with-open [] (dostuff a)) (finally (.close a))))
(identical? (def a 1) (def a 2))
true
(let [{a :a} (atom {:a 42})] a)
nil
(defn f [a b] (- a b))
#'user/f
((fn [a] (swap! a inc)) (atom 0))
1
(let [a 5] (defn ^:static foo [] a))
#'user/foo
(defn foo [a & b] [a b])
#'user/foo
(map (fn [a] [a]) [1 2 3])
([1] [2] [3])
(defn add [a b] (+ a b))
#'user/add
(let [a "3"] (case a "3" "ETT"))
"ETT"
(let [[a & b] [1]] [a b])
[1 nil]
(let [[{a :a}] [(seq [:a :A])]] a)
:A
(let [[& {a :a}] [:a 0]] a)
0
(defn mk's-cons [a b] (cons b a))
#'user/mk's-cons
((fn [[a b]] [b a]) [1 2])
[2 1]
(let [[a b] (iterate inc 1)] a)
1