schema

2016-05-15T14:02:05.000010Z

I want to create polymorphic types, and I'm curious of best practices. The previous 2 examples allow me to create a Frequency schema which can repeat an event monthly by day of month, or monthly by day of week (eg, every 15th, or every first monday, respectively). The first one uses the experimental abstract map to accomplish this, and its syntax of it is awkward (IMO). Plus being in the experimental package concerns me a bit. The second one uses s/conditional, and this suffers from not being able to easily coerce the value of type from a string to keyword, which is useful when dealing with a REST API, or JSON. (whereas s/eq is great for this). In the general case, is one of these, or some third option, the best practice for conveying: Type A is one of Types #{B C D ...}?