component.core
A component is a vector of [k & values?]. For example a minimal component is [:foo]
defc
macro
(defc k & sys-impls)Defines a component with keyword k and optional metadata attribute-map followed by system implementations (via defmethods).
attr-map may contain :let binding which is let over the value part of a component [k value].
Example:
(defsystem foo)
(defc :foo/bar
{:let {:keys [a b]}}
(foo [_]
(+ a b)))
(foo [:foo/bar {:a 1 :b 2}])
=> 3
defc*
(defc* k attr-map)Defines a component without systems methods, so only to set metadata.
defsystem
macro
(defsystem sys-name)(defsystem sys-name params-or-doc)(defsystem sys-name docstring params)A system is a multimethod which takes as first argument a component and dispatches on k.