(let [a 0 b (inc a)] [a b])
[0 1]
(let [x (atom 7)] (swap! x inc) @x)
8
(map vector [:a :b :c] (iterate inc 0))
([:a 0] [:b 1] [:c 2])
(partition 4 1 (take 15 (iterate inc 1)))
((1 2 3 4) (2 3 4 5) (3 4 5 6) (4 5 6 7) (5 6 7 8) (6 7 8 9) (7 8 9 10) (8 9 10 11) (9 10 11 12) (10 11 12 13) (11 12 13 14) (12 13 14 15))
(-> 5 ((fn [x] (* x x))) inc)
26
(into {} (map (juxt inc dec) [1 2 3]))
{2 0, 3 1, 4 2}
(sequence (comp (filter even?) (map inc)) (range 10))
(1 3 5 7 9)
(-> 30 range ((fn [coll] (map inc coll))))
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)
(map #(%1 %2) [inc dec] [2 4])
(3 3)
(dorun (take 3 (map println (iterate inc 0))))
nil
"0\n1\n2\n"
(map vector (iterate inc 0) [1 2 3])
([0 1] [1 2] [2 3])
(doseq [x (range 9000)] (println "(inc clojurebot"))
nil
"(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clojurebot\n(inc clo...
(apply str (map (comp char inc int) "IBM"))
"JCN"
(mapcat (fn [x] [x (inc x)]) (range 5))
(0 1 1 2 2 3 3 4 4 5)
(macroexpand-1 '(-> 1 (fn [x] (inc x))))
(fn 1 [x] (inc x))
(dotimes [i 3] (println "(inc borkdude)"))
nil
"(inc borkdude)\n(inc borkdude)\n(inc borkdude)\n"
(update-in [2 [1 2 3]] [1 2] inc)
[2 [1 2 4]]
(apply + (repeatedly 3 #(inc (rand-int 6))))
6
(some-> {} not-empty (update-in [:a] inc) (update-in [:b] dec))
nil
(vec (take 20 (repeatedly #(inc (rand-int 10)))))
[6 6 3 3 6 7 3 10 4 5 4 6 5 4 1 4 10 4 3 7]
(macroexpand-1 '(-> x ((fn [y] (inc y)))))
((fn [y] (inc y)) x)
(inc ({1 0, 2 0, 3 0} 2 0))
1
(update-in {:x 1} [:y] #(and % (inc %)))
{:x 1, :y nil}
((fn f [& {:keys [a]}] (inc a)) :a 1)
2
(into [] (comp (map inc) (filter even?) (take 5)) (range))
[2 4 6 8 10]
(-> 3 inc dec (as-> b [b (- b)]))
[3 -3]
(update-in {"some string" 5} ["some string"] (fnil inc 0))
{"some string" 6}
(apply (partial #(second %&) :skip) (iterate inc 0))
0
((fn [f & args] (apply f args)) inc 1)
2
(for [x [1 2 3 4 5]] (inc x))
(2 3 4 5 6)
(for [i (range 5)] (class (/ (inc i) 4)))
(clojure.lang.Ratio clojure.lang.Ratio clojure.lang.Ratio java.lang.Long clojure.lang.Ratio)
(defmacro run [expr] `(let [expr# ~expr] (inc expr#)))
#'user/run
(for [n (range 10) :when (even? n)] (inc n))
(1 3 5 7 9)
(let [counter (atom 1)] (defn unuque-int [] (swap! counter inc)))
#'user/unuque-int
(map (fn [ele] {:test (inc ele)}) [1 2 3])
({:test 2} {:test 3} {:test 4})
(let [x 1] (let [x (inc x)] (println x)))
nil
"2\n"
(let [x (drop 3 (iterate inc 1))] (println "foo"))
nil
"foo\n"
(-> [1 20 12 -2] ((partial apply max)) inc)
21
(take 10 (interleave (iterate inc 0) (iterate dec -1)))
(0 -1 1 -2 2 -3 3 -4 4 -5)
(defn my-range [start] (lazy-seq (cons start (my-range (inc start)))))
#'user/my-range
(->> 5 (/ 2) inc str reverse (apply str))
"5/7"
(defn foo [i] (lazy-seq (cons i (foo (inc i)))))
#'user/foo
(defn rkarma [nic] (list (rand-nth '[inc dec]) nic))
#'user/rkarma
(defn fact [n] (reduce * (range 1 (inc n))))
#'user/fact
(let [a (atom 0)] (defn f [] (swap! a inc)))
#'user/f
(class (filter even? (cons 2 (map inc [1 2]))))
clojure.lang.LazySeq
(update-in {:a {:b 1}} [:a :b] #(inc %))
{:a {:b 2}}
(->> 10 (#(+ % %)) (* 5) inc)
101
(meta (drop 10 (with-meta (iterate inc 1) {:type ::foo})))
nil
(update-in [0 [0 1 2] 2] [1 1] inc)
[0 [0 2 2] 2]