(with-redef-methods bindings & body)
Temporarily adds or overrides dispatch keys for the specified multi-methods while executing the body.
This works in a similar manner to with-redefs by establishing a thread local binding over the multi-methods var.
Unlike with-redefs it requires the right hand side of each binding to be a map of dispatch values to functions, of an arity compatible with the multimethod.
Temporarily adds or overrides dispatch keys for the specified multi-methods while executing the body. This works in a similar manner to with-redefs by establishing a thread local binding over the multi-methods var. Unlike with-redefs it requires the right hand side of each binding to be a map of dispatch values to functions, of an arity compatible with the multimethod.
(wrap-dispatch-fn multi-method mappings)
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 |