Skip to content

Instantly share code, notes, and snippets.

@w01fe
Last active January 2, 2016 04:19
Show Gist options
  • Save w01fe/8249876 to your computer and use it in GitHub Desktop.
Save w01fe/8249876 to your computer and use it in GitHub Desktop.
(defn both [schema]
(reify Schema
(walker [this]
(let [sub-walkers (mapv subschema-walker schemas)]
(fn [x]
(reduce
(fn [x sub-walker]
(if (utils/error? x)
x
(sub-walker x)))
x
sub-walkers))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment