(sequence (mapcat (juxt inc identity)) [1 2 3])
(2 1 3 2 4 3)
(defn two-of-each [coll] (mapcat (juxt identity identity) coll))
#'user/two-of-each
((juxt (partial + 3) (partial + 4)) 5)
[8 9]
(map (juxt key val) {1 2, 3 4})
([1 2] [3 4])
((comp first (juxt seq)) {1 2, 3 4})
([1 2] [3 4])
((juxt count (partial apply +)) [1 2 3])
[3 6]
(do (declare x) ((juxt :ns :name) (meta #'x)))
[#object [sci.impl.vars.SciNamespace 0x37a47b18 "user"] x]
((juxt get dissoc) {:a 1, :b 2} :a)
[1 {:b 2}]
((juxt get nth) (list 1 2 3) 1)
[nil 2]
((comp second (juxt println +)) 1 2 3)
6
"1 2 3\n"
((juxt :a :b) (zipmap [:a :b] [1 2]))
[1 2]
(apply identical? ((juxt first second) '(foo foo)))
false
((juxt list vector hash-set str name identity) :what)
[(:what) [:what] #{:what} ":what" "what" :what]
(into {} (map (juxt identity inc) [1 2 3]))
{1 2, 2 3, 3 4}
((juxt inc dec #(+ 10 %)) 10)
[11 9 20]
(mapcat (juxt identity identity) [1 2 3 4])
(1 1 2 2 3 3 4 4)
(map (juxt true? false? boolean) [false true nil])
([false true false] [true false true] [false false false])
(into {} (map (juxt hash identity) ["a" "b" "c"]))
{516420758 "b", 1219591486 "c", 1455541201 "a"}
((juxt unchecked-divide-int mod quot rem /) -20 6)
[-3 4 -3 -2 -10/3]
(map (juxt :name :open) [{:name "foo", :open "bar"}])
(["foo" "bar"])
((juxt class (comp class rest)) (iterate inc 1))
[clojure.lang.Iterate clojure.lang.Iterate]
(into {} (map (juxt identity name) [:a :b :c]))
{:a "a", :b "b", :c "c"}
(map (juxt dissoc macroexpand comp +) [2 nil])
([2 2 2 2] [nil nil nil nil])
(take 10 (rest (mapcat (juxt - +) (range))))
(0 -1 1 -2 2 -3 3 -4 4 -5)
((juxt identity (partial mapv class)) `(~Object ~'java.lang.Object))
[(java.lang.Object java.lang.Object) [java.lang.Class clojure.lang.Symbol]]
(map (comp class hash) ((juxt int short) 1))
(java.lang.Integer java.lang.Integer)
(map (juxt hash #(.hashCode %)) ["Raynes" "Raynos"])
([-683489962 -1854081710] [221804487 -1854081400])
((juxt filter remove) odd? [1 2 3 4])
[(1 3) (2 4)]
(-> clojure.repl/source-fn var meta ((juxt :file :line :source)))
[nil nil nil]
((juxt unchecked-divide-int mod quot rem /) 20 6)
[3 2 3 2 10/3]
(map (juxt identity meta) '[symbol (list) [vector]])
([symbol nil] [(list) {:column 36, :line 1}] [[vector] nil])
((juxt take drop) 2 [1 2 3 4])
[(1 2) (3 4)]
((apply juxt [:a :b]) {:a 0, :b 1})
[0 1]
(into {} (map (juxt inc dec) [1 2 3]))
{2 0, 3 1, 4 2}
(apply = ((juxt first second) '(:foo :foo)))
true
((juxt identity seq) (filter zero? (range 10 20)))
[() nil]
(apply hash-map (mapcat (juxt identity -) (range 4)))
{0 0, 1 -1, 2 -2, 3 -3}
((juxt keys vals) (into {} [[:a 1] [:b 2]]))
[(:a :b) (1 2)]
(map (juxt inc dec) [1 2 3 4 5])
([2 0] [3 1] [4 2] [5 3] [6 4])
((juxt list list*) 1 2 3 [4 5 6])
[(1 2 3 [4 5 6]) (1 2 3 4 5 6)]
((juxt #(subs %1 0 %2) subs) "abcd" 2)
["ab" "cd"]
(let [[bigger smaller] ((juxt inc dec) 10)] [bigger smaller])
[11 9]
(apply = (mapv (juxt first rest next) [() [] #{} {} nil]))
true
(map (juxt pr-str str) ["abc" [1 2] {:a "a"}])
(["\"abc\"" "abc"] ["[1 2]" "[1 2]"] ["{:a \"a\"}" "{:a \"a\"}"])
(sort-by (juxt first second) [[1 3] [5 4] [3]])
([1 3] [3] [5 4])
((juxt apply reduce) (partial list '*) [1 2 3])
[(* 1 2 3) (* (* 1 2) 3)]
((apply juxt [inc dec #(+ % 10)]) 0)
[1 -1 10]
((comp str (partial apply symbol) (juxt namespace name)) :foo/bar)
"foo/bar"
((juxt :k1 :k2) {:k1 1, :k2 2, :k3 3})
[1 2]
((juxt filter remove) even? [1 2 3 4 5])
[(2 4) (1 3 5)]