Provides walk function which can be used to transform schemas while preserving their structure and type.
Provides walk function which can be used to transform schemas while preserving their structure and type.
(postwalk f schema)
Performs a depth-first, post-order traversal of schema
. Calls f
on
each sub-form, uses f's return value in place of the original.
Works with Schemas implementing schema-tools.walk/WalkableSchema,
implementation is provided for built-in schemas.
Consumes seqs as with doall.
Performs a depth-first, post-order traversal of `schema`. Calls `f` on each sub-form, uses f's return value in place of the original. Works with Schemas implementing schema-tools.walk/WalkableSchema, implementation is provided for built-in schemas. Consumes seqs as with doall.
(prewalk f schema)
Like postwalk, but does pre-order traversal.
Like postwalk, but does pre-order traversal.
(walk inner outer this)
Calls inner
for sub-schemas of this schema, creating new Schema of the same
type as given and preserving the metadata. Calls outer
with the created
Schema.
Calls `inner` for sub-schemas of this schema, creating new Schema of the same type as given and preserving the metadata. Calls `outer` with the created Schema.
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |