Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. (require '[clojure.spec.test.alpha :as st])
  2. (require '[clojure.spec.alpha :as s])
  3. (require '[expound.alpha :as expound])
  4.  
  5. (set! s/*explain-out* expound/printer)
  6.  
  7. (st/instrument)
  8. (filter 123 "12333333333333") ; java.lang.Long cannot be cast to clojure.lang.IFn
  9.  
  10. (s/fdef clojure.core/filter
  11. :args (s/cat :pred fn? :coll (s/? coll?)))
  12.  
  13. (st/instrument)
  14.  
  15. (filter 123 "12333333333333")
  16.  
  17. ;; ExceptionInfo Call to #'clojure.core/filter did not conform to spec:
  18. ;; form-init3643830678794618507.clj:1
  19.  
  20. ;; -- Spec failed --------------------
  21.  
  22. ;; Function arguments
  23.  
  24. ;; (123 ...)
  25. ;; ^^^
  26.  
  27. ;; should satisfy
  28.  
  29. ;; fn?
  30.  
  31.  
  32.  
  33. ;; -------------------------
  34. ;; Detected 1 error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement