I've recently started using prismatic schema, and I'm attempting to define
a schema for a map data structure.
I understand that it is possible to use a schema to define the types of
both keys and values in the map, like so:
(def my-map {key-schema val-schema})
However, I would like to use the schema to enforce certain relationships
between the keys and values. In particular, this one:
(fn [[k v]]
(isa? (type v) k))
Is it possible to define an associative map schema that applies a predicate
to key-value pairs rather than just keys and values separately?
Thanks
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.