(update-in {[0 1] 0} [[0 1]] inc)
{[0 1] 1}
(defn f {:meta-attr :fn} [x] (inc x))
#'user/f
(update-in {} [:foo] #(inc (or % 0)))
{:foo 1}
((fn [x] [(inc x) (dec x)]) 1)
[2 0]
(map #(% 2) [dec identity inc])
(1 2 3)
(let [s 1 s (inc s)] s)
2
(defmulti second-arg-inc'd-in-words (fn [a b] (inc b)))
#'user/second-arg-inc'd-in-words
(into [] (map inc [1 2 3 4]))
[2 3 4 5]
(take 2 (map print (iterate inc 0)))
(nil nil)
"01"
(drop 9 (take 10 (iterate inc 0)))
(9)
(update-in {:a 10} [:b] (fnil inc 0))
{:a 10, :b 1}
(update-in {:a 1} [:a] (fnil inc 0))
{:a 2}
(map inc #{1 2 3 4})
(2 5 4 3)
(do (println "(inc seangrov`)") 1)
1
"(inc seangrov`)\n"
(update-in {:a 0} [:b] (fnil inc 0))
{:a 0, :b 1}
(update-in {:a {"b" 1}} [:a "b"] inc)
{:a {"b" 2}}
(let [a 10] (inc a) #_=> 11)
11
(def natural-numbers (lazy-cat [1] (map inc natural-numbers)))
#'user/natural-numbers
(for [f [inc dec]] `(~f 1))
((#object [clojure.core$inc 0x4e7bae5c "clojure.core$inc@4e7bae5c"] 1) (#object [clojure.core$dec 0x7ae92de2 "clojure.core$dec@7ae92de2"] 1))
(defn f ^long [^long i] (inc i))
#'user/f
(mapv (juxt dec identity inc) (range 10))
[[-1 0 1] [0 1 2] [1 2 3] [2 3 4] [3 4 5] [4 5 6] [5 6 7] [6 7 8] [7 8 9] [8 9 10]]
(partition 4 (take 15 (iterate inc 1)))
((1 2 3 4) (5 6 7 8) (9 10 11 12))
(sequence (map (comp inc val)) {:a 1})
(2)
(def foo (let [a 1] (inc a)))
#'user/foo
((comp inc {:a 0, :b 2}) :b)
3
(let [a 1] (eval `(inc ~a)))
2
(-> "A" first int inc char str)
"B"
(macroexpand '(ns test (:refer-clojure :only [inc])))
(ns test (:refer-clojure :only [inc]))
(for [x [1 2 3]] (inc x))
(2 3 4)
(parents (class (fn [^long x] (inc x))))
#{clojure.lang.AFunction}
(update-in {:a {:foo 1}} [:a :foo] inc)
{:a {:foo 2}}
(take-while (partial > 5) (iterate inc 2))
(2 3 4)
(-> 5 (doto ((constantly (println "OK")))) inc)
6
"OK\n"
(clojure.walk/macroexpand-all '(-> 6 inc (/ 2)))
(/ (inc 6) 2)
(update [1 2 3 4] 3 inc)
[1 2 3 5]
(let [x 1 x′ (inc x)] x′)
2
(str (seq (map inc [1 2 3])))
"(2 3 4)"
(zipmap [1 2 3] (iterate inc 10))
{1 10, 2 11, 3 12}
(update-in {{:a 1} 0} [{:a 1}] inc)
{{:a 1} 1}
((comp inc #(* 2 %)) 10)
21
(take 2 (remove even? (iterate inc 0)))
(1 3)
(-> 8 inc dec (+ 10) str)
"18"
(take (- 10 1) (iterate inc 1))
(1 2 3 4 5 6 7 8 9)
(mapcat (juxt inc dec) [1 2 3])
(2 0 3 1 4 2)
(-> 41 identity identity identity identity inc)
42
(map (juxt identity inc) [1 2 3])
([1 2] [2 3] [3 4])
(let [x 5 y (inc x)] y)
6
(let [a 1 a (inc a)] a)
2
(let [f 1] (macroexpand-1 `(inc ~f)))
(clojure.core/inc 1)
(defn foo [x] (map inc (flatten x)))
#'user/foo