Skip to content
Brian Marick edited this page Mar 20, 2016 · 73 revisions

Real-life setup and configuration

Paths and checkers

Internally, the library works with canonical type descriptions. A canonical type description is just a map with paths as keys and vectors of functions (checkers) as values.

Each path is used to descend into a whole value to discover a set of leaf values that are checked by the checkers.

Descending into structures

The happy case is when the path matches the whole value's structure. What happens, though, when the next path element is :a and the next bit of the structure isn't associative? Or if the next bit is a map but it doesn't have an :a key?

Shorthand for condensed type descriptions

Although you can, and often do, use canonical type descriptions, you'll often instead compose them out of a sequence of condensed type descriptions, such as this:

(type! :X record? {:a even?} (requires :a :b))

Some esoteric topics

Gotchas

Glossary

You can’t perform that action at this time.