Transforms async function bodies with await into Promise .then chains.
Supports await in:
Example: (defn ^:async foo [] (let [x (await (js/Promise.resolve 1))] (inc x)))
Transforms to: (defn foo [] (.then (js/Promise.resolve 1) (fn [x] (inc x))))
Transforms async function bodies with await into Promise .then chains.
Supports await in:
- let bindings: (let [x (await p)] ...)
- do forms: (do (await p) ...)
- arbitrary expressions: (inc (await p))
- macros like -> are expanded first
Example:
(defn ^:async foo []
(let [x (await (js/Promise.resolve 1))]
(inc x)))
Transforms to:
(defn foo []
(.then (js/Promise.resolve 1) (fn [x] (inc x))))The execution-local state shared by world selection and dynamic bindings.
The execution-local state shared by world selection and dynamic bindings.
Self-describing mutable references whose state is relative to an SCI world.
Self-describing mutable references whose state is relative to an SCI world.
Dense, fork-local runtime state for SCI contexts.
Stable handles are assigned integer slots once per context lineage. A world stores slot values densely and a frozen fork copies that array while the source world is quiescent. Mutable primitives CAS only their own slot, so unrelated atoms never contend on a shared world root.
Dense, fork-local runtime state for SCI contexts. Stable handles are assigned integer slots once per context lineage. A world stores slot values densely and a frozen fork copies that array while the source world is quiescent. Mutable primitives CAS only their own slot, so unrelated atoms never contend on a shared world root.
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 |