Is there a way to programmatically create a spec from data?
There will be in Spec2 (which is a work-in-progress – see Alex’s Inside Clojure
Journal posts for the state of that work).
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not ann
s/def is a macro so it doesn't evaluate the parameter n.
had to use s/def-impl instead like this
(let [n :foo/bar3
f int?]
(s/def-impl n n f)
)
On Tuesday, February 19, 2019 at 1:18:20 PM UTC+1, Sonny To wrote:
>
> (let [n :foo/bar
> f int?]
> (s/def n f)
> )
>
(let [n :foo/bar
f int?]
(s/def n f)
)
(s/get-spec :foo/bar)
why does this return nil?
it seems I can only define a spec like this
(s/def :foo/bar int?)
Is there a way to programmatically create a spec from data?
--
You received this message because you are subscribed to the