This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-17
Channels
- # announcements (11)
- # beginners (29)
- # calva (2)
- # clara (12)
- # cljsjs (1)
- # cljsrn (7)
- # clojure (39)
- # clojure-europe (6)
- # clojure-nl (7)
- # clojure-spec (6)
- # clojure-sweden (1)
- # clojure-uk (15)
- # clojuredesign-podcast (6)
- # code-reviews (2)
- # conjure (29)
- # cursive (3)
- # datomic (13)
- # duct (15)
- # emacs (1)
- # figwheel-main (2)
- # fulcro (7)
- # graalvm (16)
- # lambdaisland (4)
- # luminus (1)
- # meander (15)
- # observability (15)
- # off-topic (27)
- # parinfer (7)
- # pathom (2)
- # reitit (2)
- # rum (11)
- # shadow-cljs (57)
- # spacemacs (6)
- # sql (56)
- # tools-deps (36)
- # xtdb (3)
Wouldn't reduce be more clear? (reduce-kv (fn [m k v] (assoc m k (inc v))) {} {:a 1 :b 2}) I guess it's also not typical that I would want all my keys Val's updated at the same time.
I've found that the "map reformer" as we've been calling it on the podcast is the clearest.
(into {} (map (juxt key (comp inc val))) m)
I find myself just in-lining the (into ...)
as it's short enough and reads like what it does
I also agree with you @markbastian. The way they talked about it in middle school sounded like I would be doing a lot more geometry than I do now.