Fork me on GitHub
#schema
<
2017-09-21
>
nha22:09:41

Is there a way to distinguish a schema from other clojure values? (For the purpose of walking a schema and transforming it). s/Int s/Str etc. seem easy enough if we list them. For some other (regex, enum, maybe) I could compare the "type" (instance?). I am a bit stuck with optional:

(type (s/optional s/Any "")) ;; schema.core.One
and I am sure there would be more annoyances down the road (pred?). Now, maybe someone has thought about this already? Is there a way to know this? I am only interested in "primitive" schemas (ie. not user-defined schemas).