Liking cljdoc? Tell your friends :D

is.simm.partial-cps.ioc

Inversion of control, i.e. transformation into continuation-passing style (CPS).

Inversion of control, i.e. transformation into continuation-passing style (CPS).
raw docstring

add-env-symsclj

(add-env-syms ctx syms)
source

can-inline?clj

(can-inline? form)
source

expand-macroclj

(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?]
sourceraw docstring

handle-binding-formclj

(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.
sourceraw docstring

has-breakpoints?clj

(has-breakpoints? form
                  {:keys [breakpoints recur-target env expansion-cache
                          breakpoint-cache]
                   :as ctx})
source

invertclj

(invert ctx form)

CPS inversion with caching. Creates caches that persist across the entire inversion:

  • expansion-cache: avoids re-expanding the same macros
  • breakpoint-cache: avoids re-traversing the same sub-trees in has-breakpoints? Also tags the env with ::in-cps-transform so macros can detect they are being expanded inside a CPS transformation and skip unnecessary branches.
CPS inversion with caching.
Creates caches that persist across the entire inversion:
- expansion-cache: avoids re-expanding the same macros
- breakpoint-cache: avoids re-traversing the same sub-trees in has-breakpoints?
Also tags the env with ::in-cps-transform so macros can detect they are being
expanded inside a CPS transformation and skip unnecessary branches.
sourceraw docstring

invert-implclj

(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.
sourceraw docstring

resolve-macro-var-cljsclj

(resolve-macro-var-cljs env sym)
source

resolve-sequentiallyclj

(resolve-sequentially ctx coll then)
source

resolve-var-cljsclj

(resolve-var-cljs env sym)
source

var-nameclj

(var-name env sym)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close