If I have a function that takes a destructured map, what's the best way to 
spec that function, so that the values of the keys in my map are also 
specced? The best I've got right now is

(s/keys :req-un [::a ::b ::c])

given

(defn foo [{:keys [a b c]})

But, I'd kind of want the names of the keys for my function to not match 
the spec name of their value. And I'd rather define the spec for them 
inline. Any easy way to do that?

Would be nice to have something like:

(s/map :req [:a int? :b string? :c ::other-spec])

Which could also work with:

(s/map :req ["a" int? "b" string? "c" ::other-spec])


-- 
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