meander 2022-07-25

@peterhfmnn You want to use '#{}

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

👍 1

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

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.

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