Fork me on GitHub
#meander
<
2022-05-16
>
Gary Berger18:05:50

Hello struggling with something that maybe obvious but. How do I get the complement of this such that I return all records that the keyword :signedLicenseKeyis present?

:signedLicenseKey  (m/pred nil? ?signedLicenseKey)

Danny18:05:59

Have you tried

:signedLicenseKey  (m/pred (comp nil?) ?signedLicenseKey)

Gary Berger18:05:28

actually this does work

(m/pred (complement nil?) ?signedLicenseKey)

Danny18:05:26

I remembered the wrong comp 😄

wilkerlucio14:05:46

@U01S20S3552 some? is the complement of nil? in Clojure, so you can also use: (m/pred some? ?signedLicenseKey)

clojure-spin 1
👍 1
noprompt16:05:15

You can also use (m/some ?signedLicenseKey)

💯 1