I appreciate the wisdom of separating the existence of a key from the conformance of the values of that key.

I wonder though if there is a way to specify co-constraints; a situation where the conformance of the value of one key depends on the existence of and perhaps the value of another key.

Say for example, I want to specify a ::content-type key and a ::body key. If the ::content-type key exists and has a value of "image/png" I want to make sure the ::body key also exists and satisfies my image? predicate.

It looks like multi-specs get me to the neighborhood of a solution here but I'm not sure they quite cover it.


Thanks,

StanD.


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