specter

2023-08-31T04:49:21.467209Z

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?

xificurC 2023-08-31T07:25:38.458379Z

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

2023-08-31T07:33:09.667389Z

That's what I thought ☺️ Thank you very much for the extra mile of checking the code for me 🙏