Skip to content

Instantly share code, notes, and snippets.

View tacticiankerala's full-sized avatar

Sreenath Nannatt tacticiankerala

View GitHub Profile
@ikitommi
ikitommi / validator.clj
Last active February 16, 2016 05:07
Dummy implementation of Schema Map validator (to get more humane errors)
(require '[schema.core :as s])
(require '[schema.utils :as su])
(defn check-map [schema value]
{:pre [(map? value)]}
(if-let [value (s/check schema value)]
(into {}
(for [[k v] value]
[k (cond
(symbol? v) (keyword v)