Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (require '[clojure.spec.test.alpha :as st])
- (require '[clojure.spec.alpha :as s])
- (require '[expound.alpha :as expound])
- (set! s/*explain-out* expound/printer)
- (st/instrument)
- (filter 123 "12333333333333") ; java.lang.Long cannot be cast to clojure.lang.IFn
- (s/fdef clojure.core/filter
- :args (s/cat :pred fn? :coll (s/? coll?)))
- (st/instrument)
- (filter 123 "12333333333333")
- ;; ExceptionInfo Call to #'clojure.core/filter did not conform to spec:
- ;; form-init3643830678794618507.clj:1
- ;; -- Spec failed --------------------
- ;; Function arguments
- ;; (123 ...)
- ;; ^^^
- ;; should satisfy
- ;; fn?
- ;; -------------------------
- ;; Detected 1 error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement