(let [m {:k 4}] (:k m inc))
4
(take 2 (partition 2 (iterate inc 0)))
((0 1) (2 3))
(let [a (atom 0)] (swap! a inc))
1
(->> (range 7) (map inc) (filter even?))
(2 4 6)
((comp #(* % %) inc) 1)
4
(map inc [0 1 2 3 4])
(1 2 3 4 5)
(format "%s" (map inc [1 2 3]))
"clojure.lang.LazySeq@7c42"
(update-in {:foo {:bar 0}} [:foo :bar] inc)
{:foo {:bar 1}}
(let [a 10] (inc a) #_=> 'eleventy)
eleventy
(+ (* (inc 5) 4) 2 7)
33
(take 10 (reductions + (iterate inc 1)))
(1 3 6 10 15 21 28 36 45 55)
(let [x 42 x (inc x)] x)
43
(into () (map inc) '(1 2 3))
(4 3 2)
(take 5 (reductions + (iterate inc 0)))
(0 1 3 6 10)
(when-let [x (not-empty #{})] (map inc x))
nil
(defn safe-inc [x] (inc (or x 0)))
#'user/safe-inc
(for [i (range 10)] `(inc ~i))
((clojure.core/inc 0) (clojure.core/inc 1) (clojure.core/inc 2) (clojure.core/inc 3) (clojure.core/inc 4) (clojure.core/inc 5) (clojure.core/inc 6) (clojure.core/inc 7) (clojure.core/inc 8) (clojure.core/inc 9))
(second (doall [(iterate inc 0) [1 2]]))
[1 2]
(update-in {:a 0, :b 1} [:a] inc)
{:a 1, :b 1}
(->> (range 10) (map inc) (filter even?))
(2 4 6 8 10)
((comp inc #(* 2 %)) 0)
1
(take 5 (drop 5 (iterate inc 1)))
(6 7 8 9 10)
(defmacro fo [] (inc 1 2 3 4))
#'user/fo
(map (juxt inc dec) [1 2 3])
([2 0] [3 1] [4 2])
(map (juxt dec identity inc) (range 5))
([-1 0 1] [0 1 2] [1 2 3] [2 3 4] [3 4 5])
(letfn [(foo [x] (inc x))] (foo 1))
2
(meta '^{:foo "bar"} #(inc 1))
{:column 8, :foo "bar", :line 1}
(let [x 5] (and nil (inc x)))
nil
(for [x (range 5)] [x (inc x)])
([0 1] [1 2] [2 3] [3 4] [4 5])
(let [hiredman (atom 20)] (swap! hiredman inc))
21
(update-in [1 2 3 4] [1] inc)
[1 3 3 4]
(apply str (take 10 (iterate inc 0)))
"0123456789"
(map inc [1 2 3 4 5])
(2 3 4 5 6)
(= (map identity nil) (map inc nil))
true
(into {} (map (juxt identity inc) (range 5)))
{0 1, 1 2, 2 3, 3 4, 4 5}
(for [c "hello"] (char (inc (int c))))
(\i \f \m \m \p)
(type (seq (take 20 (iterate inc 0))))
clojure.lang.Cons
(update-in {:session {:count 0}} [:session :count] inc)
{:session {:count 1}}
(= (iterate inc 1) [1 2 3])
false
(map dec (clojure.core/->> (range 5) (map inc)))
(0 1 2 3 4)
(reduce + (map inc (range 1 1000000)))
500000499999
(letfn [(a [] (inc (c))) (c [] 3)] (a))
4
(update-in [0 1 2 3] [0] inc)
[1 1 2 3]
(map inc (vals {:a 1, :b 2}))
(2 3)
(map (fnil inc 0) [2 nil 0])
(3 1 1)
(let [x 1 x’ (inc x)] x’)
2
(for [x (range 5)] (apply inc [x]))
(1 2 3 4 5)
(update-in {:a 1, :b 2} [:b] inc)
{:a 1, :b 3}
(#(map inc %&) 1 2 3)
(2 3 4)
(update-in {:up 1, :down 1} [:up] inc)
{:down 1, :up 2}