(sequence (comp (map inc) (filter even?) (take 5)) (range))
(2 4 6 8 10)
(update-in {:a {:b 2}} [:a :b] (fnil inc 0))
{:a {:b 3}}
(defn lz [i] (lazy-seq (cons i (lz (inc i)))))
#'user/lz
(let [f (fnil inc 1)] [(f 10) (f nil)])
[11 2]
(partition 4 4 nil (take 15 (iterate inc 1)))
((1 2 3 4) (5 6 7 8) (9 10 11 12) (13 14 15))
(for [a (take 4 (iterate inc 0))] (print a))
(nil nil nil nil)
"0123"
(take 3 (filter (partial < 1000) (iterate inc 1)))
(1001 1002 1003)
(map (juxt inc dec identity) [0 1 2 3])
([1 -1 0] [2 0 1] [3 1 2] [4 2 3])
(map inc [1 2 3 4 5 6 7])
(2 3 4 5 6 7 8)
((->> coll (map inc) (fn [coll])) [1 2 3])
(2 3 4)
(defn fn2 [n] (lazy-seq (cons n (fn2 (inc n)))))
#'user/fn2
(defn fac [n] (apply * (range 1 (inc n))))
#'user/fac
(defn fn1 [n] (lazy-seq (conj (fn1 (inc n)) n)))
#'user/fn1
(sequence (comp (take 10) (map inc) (filter even?)) (range))
(2 4 6 8 10)
((fn [[& more]] (take 3 more)) (iterate inc 0))
(0 1 2)
(defn lz [i] (lazy-seq (cons i (lz (inc i)))))
#'user/lz
(reduce (fn [counter _] (inc counter)) [1 2 3])
3
((fn [x] (prn "x is" x) (inc x)) 1)
2
"\"x is\" 1\n"
(update-in [0 [0 1 2] 2] [1 2] inc)
[0 [0 1 3] 2]
(map #(take 4 %) [(range) (iterate inc 0)])
((0 1 2 3) (0 1 2 3))
((comp (partial apply *) (partial range 1) inc) 5)
120
(macroexpand '(-> 1 inc (println "is the number")))
(println (inc 1) "is the number")
(defn F [n] (lazy-seq (cons n (F (inc n)))))
#'user/F
(defn indexed [coll] (map vector (iterate inc 0) coll))
#'user/indexed
(macroexpand '(def x #(fn [%] (inc %))))
(def x (fn* [%1] (fn [%1] (inc %1))))
(apply str (for [c "hello"] (char (inc (int c)))))
"ifmmp"
(for [i (range 3)] ((juxt dec identity inc) i))
([-1 0 1] [0 1 2] [1 2 3])
(into {} (for [[k v] {:a 1}] [k (inc v)]))
{:a 2}
(->> (range 10) (map inc) (interpose 5) (reduce +))
100
(update-in {:a {:b {:c 1}}} [:a :b :c] inc)
{:a {:b {:c 2}}}
((fn [n] (/ (* n (inc n)) 2)) 5)
15
(apply (fn [x & ys] x) (iterate inc 0))
0
(map (comp (partial bit-and 3) inc) (range 4))
(1 2 3 0)
(let [a 4 b (inc a)] [a b])
[4 5]
(transduce (map inc) + '(1 2 3))
9
(apply (symbol "map") [inc '(1 2 3)])
(1 2 3)
(do (defn foo [x] (inc x)) (class foo))
sci.impl.fns$fun$arity_1__26688
(let [x (promise)] (deliver x inc) (x 2))
nil
((fn [& {a :a}] (inc a)) :a 1)
2
(transduce (map inc) + 0 [4 5 6])
18
(reduce ((map inc) conj) #{} [0 1 2])
#{1 2 3}
(into #{} (map inc #{1 2 3}))
#{2 3 4}
(range (min -2 5) (inc (max -2 5)))
(-2 -1 0 1 2 3 4 5)
(map inc '(1 2 3 4 5))
(2 3 4 5 6)
(->> (range) (filter even?) (map inc) (take 5))
(1 3 5 7 9)
(apply (fn [& _] 1) (iterate inc 0))
1
(let [x #_(inc 1) (dec 1)] x)
0
(inc (first (filter even? (range 11 20 3))))
15
(last (take 10 (reductions + (iterate inc 1))))
55
(defn bla [x] (def z x) (inc x))
#'user/bla