(defn MyClass-getFoo [this] (get (deref (. this state)) :foo))
#'user/MyClass-getFoo
(assoc (assoc (assoc {} :foo 1) :bar 2) :baz 3)
{:bar 2, :baz 3, :foo 1}
(defn foo [x] (case 1 :foo 2 :bar nil))
#'user/foo
(case (symbol "b") (a b c) :foo d :bar)
:foo((juxt #(subs % 2 5) #(subs % 5 8)) "DDXXXYYY")
["XXX" "YYY"]
((juxt #(take-nth 2 %) #(take-nth 2 (rest %))) (range 10))
[(0 2 4 6 8) (1 3 5 7 9)]
(map (juxt first #(* 2 (second %))) {1 2, 3 4})
([1 4] [3 8])
(into {} (map (juxt key #(inc (val %))) {:a 1, :b 2}))
{:a 2, :b 3}
(sort-by (juxt count last) [[1 2 3] [1 2] [0 0 10]])
([1 2] [1 2 3] [0 0 10])
(map (juxt count class) (reductions conj {} (map vec (partition 2 (range 20)))))
([0 clojure.lang.PersistentArrayMap] [1 clojure.lang.PersistentArrayMap] [2 clojure.lang.PersistentArrayMap] [3 clojure.lang.PersistentArrayMap] [4 clojure.lang.PersistentArrayMap] [5 clojure.lang.PersistentArrayMap] [6 clojure.lang.PersistentArrayMap] [7 clojure.lang.PersistentArrayMap] [8 clojure.lang.PersistentArrayMap] [9 clojure.lang.PersistentHashMap] [10 clojure.lang.PersistentHashMap])
((comp (partial apply /) (juxt (partial apply +) count)) [1 2 3])
2(every? identity ((juxt :a :b :c) {:a 1, :b 2, :c 3}))
true((apply juxt (filter identity [nil + - nil * /])) 5 3)
[8 2 15 5/3]
(let [m [1 4 2 7 8 5]] ((juxt min max) m))
[[1 4 2 7 8 5] [1 4 2 7 8 5]]
(map (juxt :a :b) [[:a 1 :b 2] [:a 5 :b 7]])
([nil nil] [nil nil])
(let [m ["the" "quick" "brown" "fox"]] (apply (juxt max-key min-key) count m))
["brown" "fox"]
(apply symbol ((juxt (comp str ns-name :ns) (comp str :name)) (meta #'first)))
clojure.core/first(mapv (juxt (partial apply *) identity) [[1 2] [3 4] [5 6]])
[[2 [1 2]] [12 [3 4]] [30 [5 6]]]
((juxt identity #(partition 2 %) #(partition 3 %)) (range 9))
[(0 1 2 3 4 5 6 7 8) ((0 1) (2 3) (4 5) (6 7)) ((0 1 2) (3 4 5) (6 7 8))]
(map (juxt seq? sequential? associative?) ['(1 2 3) [4 5 6]])
([true true false] [false true true])
(#(->> % ((juxt namespace name)) (remove nil?) (clojure.string/join "/") symbol) :bar)
bar(take 10 (map (juxt identity #(* % %)) (iterate inc 0)))
([0 0] [1 1] [2 4] [3 9] [4 16] [5 25] [6 36] [7 49] [8 64] [9 81])
(let [m1 {:foo 1, :bar 2, :baz 3} m2 {:foo 4, :bar 5}] (merge (zipmap (keys m1) (repeat nil)) m2))
{:bar 5, :baz nil, :foo 4}
(apply map vector (partition 2 [:foo 1 :bar 2]))
([:foo :bar] [1 2])
(update-in {:headers {:foo 1, :bar 2}} [:headers] select-keys [:foobar])
{:headers {}}
(filter (some-fn integer? string?) [1 2 :foo 2.0 "string"])
(1 2 "string")
(binding [*print-meta* true *print-dup* true] (print ^{:foo :bar} []))
nil"^#=(clojure.lang.PersistentArrayMap/create {:foo :bar}) []"(map-indexed {1 :foo, 2 :bar} [:baz :bing :bang :bong])
(:baz :foo :bar :bong)
(get-in {:foo {:bar {:baz 3}}} '(:foo :bar :baz) [])
3(#(next (interleave (repeat :comma) %)) [:foo :bar :baz])
(:foo :comma :bar :comma :baz)
(meta (quote #^{:foo "bar"} #^foo (+ 5 6)))
{:column 14, :foo "bar", :line 1, :tag foo}
(defn f [l] (->> l (map :foo) (apply max)))
#'user/f
(reduce-kv #(assoc %1 %3 %2) {} [:foo :bar :baz])
{:bar 1, :baz 2, :foo 0}
(apply = (map (comp symbol name) ["foo" :foo 'foo]))
true(macroexpand-1 '(-> {:foo 17} (assoc :bar "bar") println))
(println (assoc {:foo 17} :bar "bar"))
(map (juxt seq? sequential?) [(list 1 2 3) (vector 1 2 3)])
([true true] [false true])
(map set ((juxt filter remove) odd? #{1 2 3 4 5}))
(#{1 3 5} #{2 4})
(let [[a b] (repeatedly #(atom 0))] ((juxt = identical?) a b))
[false false]
(map (juxt :a :b) [{:a "a", :b "b"} {:a "a1", :b "b1"}])
(["a" "b"] ["a1" "b1"])
(map apply [inc dec] ((juxt (comp vector inc) (comp vector dec)) 0))
(2 -2)
((juxt #(get % 1) #(get % 2)) [1 3 5])
[3 5]
(let [f (juxt first second last)] (f [1 2 3 4 5]))
[1 2 5]
(update-in {:foo {:bar "bar", :baz "baz", :quz "quz"}} [:foo] (fn [foo] (into {} (remove #(some #{:bar} [(key %)]) foo))))
{:foo {:baz "baz", :quz "quz"}}
(update-in {:a {:b {:c :foo}}} [:a :b] dissoc :c)
{:a {:b {}}}
(->> {:foo 45} vals first (assoc {:text "flarp"} :id))
{:id 45, :text "flarp"}
(let [hash-args [:foo :bar :bat :baz]] `(hash-map ~@hash-args))
(clojure.core/hash-map :foo :bar :bat :baz)
(type '(1 2 3 4 :foo bar cojure.core/cons))
clojure.lang.PersistentList(map-indexed #(hash-map (str %1) %2) [:foo :bar :baz])
({"0" :foo} {"1" :bar} {"2" :baz})
(for [[k v] {:foo "bar", :fizz "buzz"}] {k v})
({:foo "bar"} {:fizz "buzz"})
(let [x :foo y :foo] {x 1, y 2})
{:foo 2}

