Prismatic/schema — pull request #98 by aperiodic (2014-05-23 22:56:44+00:00)
Title: Add named-either schema.

A named-either schema is like an either schema, except that the schemas have names. The names appear in the schema's validation failure messages, to make it easier to understand what the failing value should be.

We are using schema validation failures as part of our response to users when they submit a malformed object. The either schema's failure message, `(not (some (check % value) schemas))`, doesn't have any information about what the schemas actually are, so it was not useful for us. The named-either schema lets us replace `schemas` with the schema names so that the user has some idea of what went wrong and what they should be trying to match.