Inversion of control, i.e. transformation into continuation-passing style (CPS).
Inversion of control, i.e. transformation into continuation-passing style (CPS).
(expand-macro form env)Expand a macro form if it's actually a macro. Returns [expanded changed?]
Expand a macro form if it's actually a macro. Returns [expanded changed?]
(handle-binding-form {:keys [r e env] :as ctx} form)Handle binding/with-redefs forms to restore bindings in continuations.
Intercepts binding forms BEFORE macro expansion to wrap continuations with binding restoration. This ensures that when continuations fire after the binding scope exits, they restore the outer bindings that were active before the binding form was entered.
Handle binding/with-redefs forms to restore bindings in continuations. Intercepts binding forms BEFORE macro expansion to wrap continuations with binding restoration. This ensures that when continuations fire after the binding scope exits, they restore the outer bindings that were active before the binding form was entered.
(has-breakpoints? form
{:keys [breakpoints recur-target env expansion-cache]
:as ctx})(invert ctx form)CPS inversion with macro expansion caching. Creates an expansion cache atom that persists across has-breakpoints? calls to avoid re-expanding the same macros multiple times.
CPS inversion with macro expansion caching. Creates an expansion cache atom that persists across has-breakpoints? calls to avoid re-expanding the same macros multiple times.
(invert-impl {:keys [r e sync-recur? recur-target breakpoints env expansion-map]
:as ctx}
form)Internal implementation of invert. Assumes expansion-map is already in ctx.
Internal implementation of invert. Assumes expansion-map is already in ctx.
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 |