Fork me on GitHub
#beginners
<
2017-08-08
>
leira05:08:08

@yonatanel reduced is a wonderful idea: (reduce #(if (= %1 %2) (reduced %2) %2) [100 50 20 10 10 10 10])

hmaurer14:08:24

Hi! How can an error map suitable for being returned by a JSON API from Plumatic’s schema s/validate?

noisesmith16:08:17

@hmaurer if you use s/check instead, that returns a data structure based on the schema itself, describing the data differences, instead of throwing an exception

noisesmith16:08:38

it follows the same rules as s/validate, but gives you good machine readable data