Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (s/def ::foo (s/cat :f #{'foo} :arg number?))
  2.  
  3. ;; gen/generate produces something like '(foo 42), like expected
  4. ;; nonetheless, s/valid? says true if ['foo 42], which isn't a list expressing a call to 'foo, what we want
  5.  
  6. ;; unfortunately (s/and seq? ...) in the definition kills the automatic generation
  7. ;; (s/and ... seq?) doesn't work for validation because s/and conforms the value and pass it to the next predicate
  8.  
  9. ;; any solution ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement