This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-20
Channels
- # announcements (5)
- # asami (162)
- # babashka (15)
- # beginners (1)
- # bitcoin (1)
- # calva (10)
- # chlorine-clover (3)
- # cider (1)
- # clj-kondo (4)
- # cljfx (10)
- # cljs-dev (1)
- # cljsrn (7)
- # clojure (38)
- # clojure-europe (69)
- # clojure-germany (2)
- # clojure-serbia (1)
- # clojurescript (22)
- # community-development (2)
- # conjure (1)
- # core-async (2)
- # cursive (14)
- # datahike (4)
- # fulcro (7)
- # graalvm (34)
- # helix (13)
- # honeysql (3)
- # lsp (134)
- # meander (56)
- # membrane (1)
- # off-topic (35)
- # practicalli (31)
- # releases (4)
- # rewrite-clj (5)
- # tools-deps (3)
- # vscode (6)
- # xtdb (8)
Slight update to Void
, a CLJC library for handling nil
(especially with collections): https://github.com/helins/void.cljc
👍 12
⚫ 3
3
(= (void/assoc {:a 42}
:a nil
:b 42)
{:a 42
:b 42})
this is surprising, I would expect {:b 42}
instead, in a way consistent with your update function.I had the same thought @U8MJBRSR5; Seems inconsistent with respect to whether nil clears out a k/v pair or just doesn't update.
Indeed, assoc
is a no-op in case of nil. What you describe is its sibling, assoc-strict
, which does that :)
I guess it should be better examplified in the README.