(count (take 20 (map inc (range))))
20
(mapcat (juxt identity inc) (range 5))
(0 1 1 2 2 3 3 4 4 5)
(str (char (inc (int (first "A")))))
"B"
((comp (partial bit-and 3) inc) 6)
3
(update [0] 1 (fnil inc 0))
[0 1]
(map inc [4 3 2 1])
(5 4 3 2)
(repeatedly 3 #(inc (rand-int 8)))
(6 3 6)
(map inc (flatten [[1] [[[2]] [3]]]))
(2 3 4)
(doseq [x (range 5)] (inc x))
nil
(supers (class (seq (map inc [1]))))
#{clojure.lang.ASeq clojure.lang.IChunkedSeq clojure.lang.IHashEq clojure.lang.IMeta clojure.lang.IObj clojure.lang.IPersistentCollection clojure.lang.ISeq clojure.lang.Obj clojure.lang.Seqable clojure.lang.Sequential java.io.Serializable java.lang.Iterable java.lang.Object java.util.Collection java.util.List}
(map #(%1 10) [inc dec])
(11 9)
(mapv inc [0 1 2 44])
[1 2 3 45]
(into (sorted-set) (map inc (range 5)))
#{1 2 3 4 5}
(into [] (map inc) [1 2 3])
[2 3 4]
(pr-str (drop 20 (iterate inc 0)))
"(20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 ...)"
(range (int \a) (inc (int \c)))
(97 98 99)
(format "%s" (map inc (range 5)))
"clojure.lang.LazySeq@1c3e4a2"
(map inc [1 2 3 4])
(2 3 4 5)
(defn f [x] (inc (f x)))
#'user/f
(try (inc 1) (finally (println "foo")))
2
"foo\n"
(reduce + (range 1 (inc 1000)))
500500
(if-let [x 1] (inc x) :no-such-thing)
2
(dorun (take 4 (iterate inc 1)))
nil
(({:a inc, :b dec} :a) 1)
2
(seq (take 20 (iterate inc 0)))
(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
(-> 42 identity inc (identity) (dec))
42
(-> 5 range ((partial map inc)))
(1 2 3 4 5)
((apply comp (repeat 100 inc)) 0)
100
(update-in {:a 1, :b 2} [:a] inc)
{:a 2, :b 2}
(sequence (map inc) '(1 2 3))
(2 3 4)
(let [a 1 a' (inc 1)] a')
2
((fn [a] (swap! a inc)) (atom 0))
1
(defmacro run [expr] `(inc (eval ~expr)))
#'user/run
(for [i (range 10)] [i (inc i)])
([0 1] [1 2] [2 3] [3 4] [4 5] [5 6] [6 7] [7 8] [8 9] [9 10])
(for [i (range 10)] '(inc ~i))
((inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)) (inc (clojure.core/unquote i)))
(concat [1 2] (map inc (range 2)))
(1 2 1 2)
(update-in {:a 1} [:b] (fnil inc 0))
{:a 1, :b 1}
(intern 'user 'f (fn [x] (inc x)))
#'user/f
(take-while (partial > 1000) (iterate inc 0))
(0 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 1...
(update-in {[:x :y] 1} [[:x :y]] inc)
{[:x :y] 2}
(chunked-seq? (map inc (seq (vec (range 100)))))
false
(update-in {:a 1} [:a] #(inc %))
{:a 2}
(macroexpand-1 '(-> b (update-in [:a] inc)))
(update-in b [:a] inc)
(def xf2 (comp (filter odd?) (map inc)))
#'user/xf2
(update-in {:t {:a 4}} [:t :a] inc)
{:t {:a 5}}
(take 10 (filter odd? (iterate inc 0)))
(1 3 5 7 9 11 13 15 17 19)
(- (int (inc (/ 25 2))) 6)
7
(meta (with-meta (iterate inc 1) {:type ::foo}))
{:type :user/foo}
(let [x 1 x’ (inc x)] x’)
2
(let [[a b] (iterate inc 1)] a)
1