Created
June 20, 2016 23:21
-
-
Save christianromney/4b643b7400386aabd28a5f1b224b9251 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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