(apply format "%s %s" ((juxt :first :last) {:first "Bob", :last "Smith"}))
"Bob Smith"
(->> clojure.string quote ns-publics vals (map meta) (map (juxt :name :doc)))
([ends-with? "True if s ends with substr."] [capitalize "Converts first character of the string to upper-case, all other\n characters to lower-case."] [reverse "Returns s with its characters reversed."] [join "Returns a string of all elements in coll, as returned by (seq coll),\n separated by an optional separator."] [replace-first "Replaces the first instance of match with replacement in s.\n\...
(for [coll [{:a 1} #{:a}]] (juxt #(get % :a)))
(#object [clojure.core$juxt$fn__5889 0x4af77572 "clojure.core$juxt$fn__5889@4af77572"] #object [clojure.core$juxt$fn__5889 0x4430825c "clojure.core$juxt$fn__5889@4430825c"])
(reduce (juxt (partial str "\n") :a) '({:a 1} {:a 2}))
["\n{:a 1}{:a 2}" 1]
(map (juxt inc dec odd? even? pos? neg?) [12 13 14])
([13 11 false true true false] [14 12 true false true false] [15 13 false true true false])
(into {} (map (juxt (comp keyword str hash) identity) ["a" "b" "c"]))
{:1219591486 "c", :1455541201 "a", :516420758 "b"}
(* 2 (.length (str (flatten (macroexpand '((juxt namespace symbol) `'`'`'`a))))))
58
((juxt identity boolean) [(when (pos? -1) [1]) (when (pos? -1) [-1])])
[[nil nil] true]
((juxt #(% true) #(% false)) (group-by even? (range 10)))
[[0 2 4 6 8] [1 3 5 7 9]]
((juxt identity #(apply map list %&)) (partition 3 (range 9)))
[((0 1 2) (3 4 5) (6 7 8)) (((0 1 2)) ((3 4 5)) ((6 7 8)))]
(let [f (juxt first last)] (f [6 7 8 9 10]))
[6 10]
((juxt merge conj) {:a 1} {:b 2} {:a 3, :c 5})
[{:a 3, :b 2, :c 5} {:a 3, :b 2, :c 5}]
(map (juxt identity (comp (partial * 2) inc)) [1 2 3])
([1 4] [2 6] [3 8])
((juxt :a :b) {:a 1, :b 2, :c 3, :d 4})
[1 2]
((apply juxt (map (partial partial apply) [+ -])) [1 2 3])
[6 -4]
((juxt :x :y) {:a :e, :f "foo", :x 0, :y 1})
[0 1]
((juxt some (comp first filter)) odd? [2 4 6 5 7])
[true 5]
(into {} (map (juxt key (comp inc val)) {:a 1, :b 2}))
{:a 2, :b 3}
(-> 321 Integer/toString ((partial repeat 2)) ((juxt first (comp reverse second))))
["321" (\1 \2 \3)]
(map (juxt seq? sequential?) ['(1 2 3) [4 5 6]])
([true true] [false true])
(map (juxt sequential? seq?) '[[1 2 3] (1 2 3)])
([true false] [true true])
(map (comp first (juxt identity (comp prn inc))) [1 2 3])
(1 2 3)
"2\n3\n4\n"
(map (juxt count class) (reduce conj {} (map vec (partition 2 (range 20)))))
([2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry] [2 clojure.lang.MapEntry])
((juxt :a :b :c) {:a 4, :b 5, :c 6, :d 7})
[4 5 6]
(every? identity ((juxt :a :b :c) {:a 1, :b 2, :c nil}))
false
(let [[l r] ((juxt take drop) 3 (range 10))] (concat r l))
(3 4 5 6 7 8 9 0 1 2)
(reduce + ((juxt #(* % 2) #(/ % 2)) 10))
25
(map (juxt seq? coll? vector? list? sequential? associative?) '(() [] (range 10) {} #{}))
([true true false true true false] [false true true false true true] [true true false true true false] [false true false false false true] [false true false false false false])
(map (juxt pop (memoize pop)) [[1 2 3] '(1 2 3)])
([[1 2] [1 2]] [(2 3) [1 2]])
(defn fork [f g h] (comp (partial apply f) (juxt g h)))
#'user/fork
(map (juxt first #(* 2 (second %))) {1 2, 3 4})
([1 4] [3 8])
(every? identity ((juxt :a :b :c) {:a 1, :b 2, :c 3}))
true
((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)]
(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
((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])
(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})