Groups
Sign in
Groups
Clojure
Conversations
About
Send feedback
Help
clojure.spec question
76 views
Skip to first unread message
Philos Kim
unread,
Sep 24, 2016, 10:46:55 AM
9/24/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Clojure
How can I define the following spec?
{"id" 1 "name" "john"}
1) The keys of a map must be the string type, not the keyword type.
2) The values must be fixed. Namely, the value of the key "id" must be 1 and the value of the key "name" must be "john"
Alex Miller
unread,
Sep 24, 2016, 12:31:22 PM
9/24/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Clojure
#{{"id" 1 "name" "john"}} is a valid spec for that
Reply all
Reply to author
Forward
0 new messages