In https://github.com/noprompt/meander/blob/epsilon/doc/operator-overview.md#rest What’s happening in
(m/match #{1 2 3}
#{^& ?rest}
?rest)
What is & contributing here? More importantly what’s ^ contributing here??I'm guessing it's a hack to be able to rest match a set, so it's attached as a tag
because sets are unordered
(m/match #{1 2 3}
#{1 ^& ?rest}
?rest)
;;=> #{2 3}allows you to match the rest of the elements from the set
macro expands to cojure.set/difference
Woa, thanks. I didn’t think to macroexpand but I can actually read the code I get out of macroexpanding that example!