((comp (juxt juxt juxt) juxt) juxt juxt)
[#object [clojure.core$juxt$fn__5889 0x94c2aaf "clojure.core$juxt$fn__5889@94c2aaf"] #object [clojure.core$juxt$fn__5889 0x78bd5f6 "clojure.core$juxt$fn__5889@78bd5f6"]]
((juxt (comp) comp) 5)
[5 5]
((comp first (juxt inc)) 1)
2
((juxt (juxt first second) (juxt (comp first rest rest) (comp second rest rest))) (range 1 5))
[[1 2] [3 4]]
((comp (juxt (juxt first second) (juxt (comp first rest rest) (comp second rest rest))) (partial sort-by identity)) (range 1 5))
[[1 2] [3 4]]
((juxt (comp first list) (comp second list)) 'a 'b)
[a b]
(def sort (comp first (juxt sort)))
#'user/sort
((juxt seq (comp list not-empty)) "abc")
[(\a \b \c) ("abc")]
((comp first ((partial juxt inc))) 1)
2
(->> [1 2] ((juxt (comp dec first) (comp inc second))))
[0 3]
(map (juxt (comp name str) (comp str name)) ["foo" 'foo :foo])
(["foo" "foo"] ["foo" "foo"] [":foo" "foo"])
((juxt sequential? (comp seq? seq)) {1 2})
[false true]
(map (juxt counted? class) ((juxt identity (comp read-string pr-str)) (range 5)))
([true clojure.lang.LongRange] [true clojure.lang.PersistentList])
((comp (juxt identity supers) class) [1 2])
[clojure.lang.PersistentVector #{java.lang.Iterable clojure.lang.Reversible clojure.lang.Sequential clojure.lang.IReduce clojure.lang.IPersistentStack clojure.lang.AFn java.util.List java.lang.Runnable clojure.lang.Counted java.io.Serializable clojure.lang.IHashEq clojure.lang.IReduceInit java.lang.Comparable clojure.lang.ILookup clojure.lang.IKVReduce clojure.lang.IPersistentCollection clojure.la...
(map (comp first (juxt identity (comp prn inc))) [1 2 3])
(1 2 3)
"2\n3\n4\n"
(map (juxt (comp inc rand-int) +) (range 10))
([1 0] [1 1] [1 2] [2 3] [1 4] [2 5] [4 6] [6 7] [3 8] [8 9])
(map (comp second (juxt println double)) (range 4))
(0.0 1.0 2.0 3.0)
"0\n1\n2\n3\n"
((comp second (juxt list +)) 1 2 3)
6
((comp (juxt identity supers) class) (first {:a 1}))
[clojure.lang.MapEntry #{clojure.lang.IMapEntry java.lang.Iterable clojure.lang.Reversible clojure.lang.Sequential clojure.lang.IPersistentStack clojure.lang.AFn java.util.List java.lang.Runnable clojure.lang.Counted java.io.Serializable java.util.Map$Entry clojure.lang.IHashEq java.lang.Comparable clojure.lang.ILookup clojure.lang.IPersistentCollection clojure.lang.IPersistentVector clojure.lang....
((juxt sequential? (comp seq? seq)) #{1 2})
[false true]
((juxt (comp count filter) (comp count remove)) (comp #{"1.3"} :added) (map meta (vals (ns-publics 'clojure.core))))
[0 538]
(apply symbol ((juxt (comp str ns-name :ns) (comp str :name)) (meta #'first)))
clojure.core/first
(map apply [inc dec] ((juxt (comp vector inc) (comp vector dec)) 0))
(2 -2)
(map (juxt dissoc macroexpand comp +) [2 nil])
([2 2 2 2] [nil nil nil nil])
(map (comp class hash) ((juxt int short) 1))
(java.lang.Integer java.lang.Integer)
((comp first (juxt seq)) {1 2, 3 4})
([1 2] [3 4])
((comp second (juxt println +)) 1 2 3)
6
"1 2 3\n"
((juxt class (comp class rest)) (iterate inc 1))
[clojure.lang.Iterate clojure.lang.Iterate]
(map (juxt not-empty (comp not empty) (comp not empty?)) [nil [] [1 2 3]])
([nil true false] [nil false false] [[1 2 3] false true])
((comp str (partial apply symbol) (juxt namespace name)) :foo/bar)
"foo/bar"
(def group-by-vals (comp (partial apply group-by) (juxt identity keys)))
#'user/group-by-vals
((comp (partial apply reduce conj) (juxt (comp first list) (comp range second list))) [:a :b :c] 4)
[:a :b :c 0 1 2 3]
(apply zipmap ((juxt (comp list :pos) (comp list vector :step)) {:step 1, :pos :s1}))
{:s1 [1]}
((juxt (comp set filter) (comp set remove)) odd? #{1 2 3 4 5})
[#{1 3 5} #{2 4}]
(map (juxt (comp count val) key) (group-by odd? [1 2 7 9 8 5 1 0 1]))
([6 true] [3 false])
(def square (comp (partial apply *) (juxt identity identity)))
#'user/square
(defn map-vals [f] (map (juxt key (comp f val))))
#'user/map-vals
(into {} (map (juxt key (comp inc val))) {:a 1})
{:a 2}
(map (juxt key (comp :doc meta val)) (ns-publics 'clojure.set))
([union "Return a set that is the union of the input sets"] [map-invert "Returns the map with the vals mapped to the keys."] [join "When passed 2 rels, returns the rel corresponding to the natural\n join. When passed an additional keymap, joins on the corresponding\n keys."] [select "Returns a set of the elements for which pred is true"] [intersection "Return a set that is the intersection of th...
((partial (comp seq reduce) (comp (partial apply conj) (juxt first (comp (partial + 1) second)) list) []) (range 10))
(1 2 3 4 5 6 7 8 9 10)
((comp (partial apply str) (juxt namespace (constantly "/") name)) :foo/bar)
"foo/bar"
(def funcall (comp (partial apply apply) (juxt first rest) list))
#'user/funcall
(mapv (juxt first (comp inc second)) [["a" 0] ["b" 1]])
[["a" 1] ["b" 2]]
(zipmap [:mod :dividend] ((juxt mod (comp int /)) 10 100))
{:dividend 0, :mod 10}
((comp (partial into {}) (partial map (juxt count identity))) ["yes" "no"])
{2 "no", 3 "yes"}
(into {} (map (comp (juxt :name :doc) meta)) (ns-publics (the-ns 'clojure.core)))
{nil nil}
(into {} (map (juxt (comp keyword hash) identity) ["a" "b" "c"]))
{nil "c"}
(into {} (map (juxt (comp {:id :ID} first) second) {:id 1}))
{:ID 1}
(map (juxt (comp dec :a) (comp inc :b)) [{:a 1, :b 2} {:a 3, :b 4}])
([0 3] [2 5])
(into {} (map (comp (juxt :name :doc) meta)) (vals (ns-publics (the-ns 'clojure.core))))
{+' "Returns the sum of nums. (+') returns 0. Supports arbitrary precision.\n See also: +", decimal? "Returns true if n is a BigDecimal", sort-by "Returns a sorted sequence of the items in coll, where the sort\n order is determined by comparing (keyfn item). If no comparator is\n supplied, uses compare. comparator must implement\n java.util.Comparator. Guaranteed to be stable: equal element...