@ben.mumford620 has joined the channel
hi all, i have a value and i want to check it is a map which can have any values except a specific few. how best to do this?
something knarly like this: (s/pred #(and (map? %) (empty? (some #{:a :b} (keys %)))))
@ben.mumford620 I probably would implement it with constrained:
(schema/constrained {schema/Any schema/Any}
(fn [m]
(empty? (clojure.set/intersection (set (keys m))
#{:alpha :beta})))
"Can't contain certain keys")the actual function checking for certain keys could of course be done with some like you did instead of intersection