Fork me on GitHub
#meander
<
2022-07-25
>
noprompt05:07:21

@peterhfmnn You want to use '#{}

(let [f (r/find
          #{'a ^& '#{}} :yes)]
  [(f #{'a 'b}) (f #{'a})])
;=> [nil :yes]

👍 1
peterh13:07:23

Awesome! I somehow wasn’t aware that (= #{} '#{}), but this makes a lot of sense!

noprompt22:07:00

I have mixed feelings about this though and, in the next version of the library, I think this will be an optional semantic because I think it is slightly confusing. Mostly, I did this to make matching on those data types more Clojure friendly.

noprompt05:07:02

Set patterns represent subsets the same way map patterns represent submaps.