Fork me on GitHub
#specter
<
2023-08-31
>
Lidor Cohen04:08:21

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?

Lidor Cohen07:08:09

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