Fork me on GitHub
#malli
<
2020-04-30
>
ikitommi08:04:04

@teodorlu Agree, would be useful. I think someone could make a thesis (and read other people theses ;)) out of the providers. The current impl is really naive (69 loc), help most welcome. Ambrose might have some math for this already on typed clojure

👍 4
teodorlu08:04:14

I'll have a look at the provider source 🙂

daveliepmann14:04:52

@teodorlu I had a similar thought under which your hypothetical looked like [:map [:strength int?] #{"mage" "paladin" "ranger"}] in my head 🙂

😄 4
daveliepmann14:04:21

The shortest real example I have is [:map-of #{<domain-specific items>} [:map-of #{<more domain-specific items>} boolean?]] . (The first set of domain items is limited but long enough to make me not want to enumerate each key to the same spec of values; the second set of domain items is IDs from another system that can't be enumerated in a spec but that I might want to check the existence of.) On some of the larger schemas I can see some difficulty getting the API for mp/provide to play nicely with a skeleton schema, because of how nested it would have to be.