Forbidden keys in clojure.spec
<p>I am following the <a href="http://clojure.org/guides/spec" rel="noreferrer">clojure.spec guide</a>. I understand it is possible to declare required and optional attributes when using clojure.spec/keys.</p>

<p>I don't understand what is meant by optional. To me :opt doesn't do anything.</p>

<pre><code>(s/valid? (s/keys :req [:my/a]) {:my/a 1 :my/b 2}) ;=&gt; true

(s/valid? (s/keys :req [:my/a] :opt []) {:my/a 1 :my/b 2}) ;=&gt; true
</code></pre>

<p>The guide promises to explain this to me, "We’ll see later where optional attributes can be useful", but I fail to find the explanation. Can I declare forbidden keys? Or somehow declare the set of valid keys to equal the keys in :req and :opt?</p>