This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-31
Channels
- # aleph (37)
- # babashka (23)
- # beginners (46)
- # calva (1)
- # catalyst (12)
- # cider (3)
- # circleci (5)
- # clj-kondo (8)
- # clojure (188)
- # clojure-europe (28)
- # clojure-nl (1)
- # clojure-norway (84)
- # clojure-sweden (2)
- # clojure-uk (1)
- # clojurescript (6)
- # clr (1)
- # cursive (4)
- # datahike (4)
- # datascript (7)
- # datomic (31)
- # deps-new (16)
- # emacs (4)
- # fulcro (4)
- # gratitude (17)
- # hyperfiddle (24)
- # introduce-yourself (4)
- # jobs (5)
- # off-topic (84)
- # pathom (10)
- # polylith (21)
- # portal (6)
- # re-frame (6)
- # reitit (4)
- # releases (1)
- # sci (74)
- # specter (3)
- # tools-build (3)
- # tools-deps (5)
I have the following selector:
(def selector [sp/META (sp/must ::Obj) (sp/must ::PARENT) sp/ATOM])
now I have the following:
(sp/select-any selector {}) => NONE
(sp/select-first selector {}) => nil
I first went with select-any
because it's: "This is the most efficient of the various selection operations".
But what I need is nil
instead of NONE
, so my question is this:
Is there a way to get nil
out of select-any
and still being more efficient than select-first
? or not? or for this kind of selector it doesn't really matter?it's just an extra identical?
check, I wouldn't worry about it https://github.com/redplanetlabs/specter/blob/67e86806020b9d02fbca8cdb1efad3002fc81a32/src/clj/com/rpl/specter/impl.cljc#L418
That's what I thought ☺️ Thank you very much for the extra mile of checking the code for me 🙏