Schema-tools Api Documentation

Version: 0.9.0

schema-tools.walk

Provides walk function which can be used to transform schemas while preserving their structure and type.

postwalk

added in 0.8

(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.

prewalk

added in 0.8

(prewalk f schema)

Like postwalk, but does pre-order traversal.

walk

added in 0.3.0

(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.

WalkableSchema

protocol

members

-walk

(-walk this inner outer)