The composition root: fills every lower-layer slot that calls a higher layer.
A lower layer that needs a higher layer's function exposes a slot
(install-*!, set-*-fn!, set-*-hook!) instead of requiring upward or
resolving at runtime. Only this namespace fills those slots, once per process:
the binary entry, the gateway server and the stdio engine call install!
before they serve. Tests that exercise a wired path call it too.
Slots receive Vars, so reloading a namespace during development keeps the wiring live.
The composition root: fills every lower-layer slot that calls a higher layer. A lower layer that needs a higher layer's function exposes a slot (`install-*!`, `set-*-fn!`, `set-*-hook!`) instead of requiring upward or resolving at runtime. Only this namespace fills those slots, once per process: the binary entry, the gateway server and the stdio engine call `install!` before they serve. Tests that exercise a wired path call it too. Slots receive Vars, so reloading a namespace during development keeps the wiring live.
(install!)Fill every slot once. Idempotent; returns nil.
Fill every slot once. Idempotent; returns nil.
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 |