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 annoying somebody, you're not really alive."
-- Margaret Atwood

________________________________
From: clojure@googlegroups.com <clojure@googlegroups.com> on behalf of Sonny To 
<son.c...@gmail.com>
Sent: Tuesday, February 19, 2019 4:18:20 AM
To: Clojure
Subject: dynamically defining specs

(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 Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
clojure+unsubscr...@googlegroups.com<mailto:clojure+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to