Skip to content

Instantly share code, notes, and snippets.

@christianromney
Created June 20, 2016 23:21
Show Gist options
  • Save christianromney/4b643b7400386aabd28a5f1b224b9251 to your computer and use it in GitHub Desktop.
Save christianromney/4b643b7400386aabd28a5f1b224b9251 to your computer and use it in GitHub Desktop.
(def path-element (s/or :key keyword? :index integer?))
(s/def :column/title string?)
(s/def :column/spec (s/or :path (s/+ path-element)
:path+keys (s/cat :path (s/* path-element)
:keys (s/coll-of keyword? []))
:path+fn (s/cat :path (s/* path-element)
:fn fn?)
:fn fn?))
(s/def ::column (s/keys :req [:column/title :column/spec]))
(s/def :grid/title string?)
(s/def :grid/columns (s/+ ::column))
(s/def :grid/rows vector?)
(s/def ::grid (s/keys :req [:grid/columns :grid/rows]
:opt [:grid/title]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment