Fork me on GitHub
#clojure-spec
<
2020-05-03
>
oskarkv20:05:22

I tried one of the examples on http://clojure.org, namely this one:

(defn adder [x] #(+ 1 x %))

(s/fdef adder
  :args (s/cat :x number?)
  :ret (s/fspec :args (s/cat :y number?)
                :ret number?)
  :fn #(= (-> % :args :x) ((:ret %) 0)))
And I did did
(st/instrument `adder)
If I pass in a string, I get a complaint. But as you can see, I added a 1 in the body of adder so that the :fn check wouldn't hold. But nothing happens when I call adder. What's going on?