(map read-string ["#=(println :foo)" "2" "3"])
(nil 2 3)
":foo\n"({:bar 4, :index 3} {:foo 2, :index 1})
nil(-> {} (assoc 1 :foo) (assoc (long 1) :bar))
{1 :bar}
(if (#{:foo :bar :baz} :quux) "yea" "nea")
"nea"(binding [*out* :foo] (doall (lazy-seq (cons *out* nil))))
(:foo)
(->> [:foo :bar] cycle (take-nth 2) (take 10))
(:foo :foo :foo :foo :foo :foo :foo :foo :foo :foo)
((some-fn :foo :bar :baz) {:bar false, :baz 3})
3(do :foo 5 9 'c (+ 1 2))
3(if (#{:foo :bar :baz} :bar) "yea" "nea")
"yea"(clojure.core/apply clojure.core/vector (clojure.core/seq (clojure.core/concat (clojure.core/list :foo) (clojure.core/list :bar))))
[:foo :bar]
(do (first (rest (cons :a (lazy-seq (println :foo))))))
nil":foo\n"(let [a {}] (identical? a (with-meta a {:foo 1})))
false(binding [*1 (fn [x] (identity x))] (#'*1 :foo))
:foo(macroexpand '(->> [:foo :bar] cycle (take-nth 4)))
(take-nth 4 (cycle [:foo :bar]))
(binding [*print-meta* true] (pr-str (with-meta 'x {:tag :foo})))
"^:foo x"(binding [*1 (fn [x] x)] ((var *1) :foo))
:foo(def y [{:a {:x :foo}} {:a {:x :bar}}])
#'user/y
(apply println :foo :bar (if true [[:baz :qux]] []))
nil":foo :bar [:baz :qux]\n"(let [a (delay (println :foo) 1)] [@a @a])
[1 1]
":foo\n"(let [v [:foo :bar]] (defn foo [x] v))
#'user/foo
(clojure.walk/macroexpand-all '(->> [:foo :bar] cycle (take-nth 4)))
(take-nth 4 (cycle [:foo :bar]))
(empty? (keep identity (vals {:foo nil, :spam nil})))
true(let [input ^{:foo :bar} {:a 1}] (let [{a :a} input {foo :foo} (meta input)] (str foo \: a)))
":bar:1"(->> [[:foo "bar"] [:baz "quux"] [:foo "doh"]] (group-by first) (map (fn [[k v]] [k (vec (map last v))])) (into {}))
{:baz ["quux"], :foo ["bar" "doh"]}
(let [f (juxt first last)] (f [6 7 8 9 10]))
[6 10]
(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]
((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)))]
((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)]
((juxt merge conj) {:a 1} {:b 2} {:a 3, :c 5})
[{:a 3, :b 2, :c 5} {:a 3, :b 2, :c 5}]
(map (comp first (juxt identity (comp prn inc))) [1 2 3])
(1 2 3)
"2\n3\n4\n"(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 (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
(def state {:foo {[1 2] :bar, [3 4] :baz}})
#'user/state
(reduce #(assoc %1 :foo %2) {} [1 2 3])
{:foo 3}
(reduce #(assoc %1 %2 :foo) {} [1 2 3])
{1 :foo, 2 :foo, 3 :foo}
(let [p (promise)] (deliver p :foo) (deliver p :bar))
nil(= (reify Object (equals [this _] (println "alert!"))) :foo)
false

