Basic application state processing. See documentation of process function.
Basic application state processing. See documentation of `process` function.
(process {:keys [proc-fn proc-order] :or {proc-order identity} :as proc-args}
app-def
data)Processes input data using rules defined in app-def and processing functions from proc-args.
Argument app-def is a hierarchical map, data is a map of input maps that will be used when
assembling resulting application state. Looks in app-def for nodes satisfying proc-node?,
then processes them in order calculated from dependencies.
Structure proc-args has following functions:
:proc-node? - accepts node returns true if given node qualifies for processing
:proc-fn - processing function (see below)
:proc-order - accepts paths list processing order, either identity or reverse
:requires - dependencies (list of paths)
:before - reverse dependencies (list of paths)
Function proc-fn accepts argument map with following keys:
:state - local state structure (built so far)
:app-state - full state structure (built so far)
:path - path to element currently processed
:pdef - processing definition
:data - local input data
:all-data - all input data
Processes input data using rules defined in `app-def` and processing functions from `proc-args`. Argument `app-def` is a hierarchical map, `data` is a map of input maps that will be used when assembling resulting application state. Looks in `app-def` for nodes satisfying `proc-node?`, then processes them in order calculated from dependencies. Structure proc-args has following functions: * `:proc-node?` - accepts node returns true if given node qualifies for processing * `:proc-fn` - processing function (see below) * `:proc-order` - accepts paths list processing order, either `identity` or `reverse` * `:requires` - dependencies (list of paths) * `:before` - reverse dependencies (list of paths) Function proc-fn accepts argument map with following keys: * `:state` - local state structure (built so far) * `:app-state` - full state structure (built so far) * `:path` - path to element currently processed * `:pdef` - processing definition * `:data` - local input data * `:all-data` - all input data
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 |