The carrier holding the current scope map.
The carrier holding the current scope map.
(create-carrier)Instantiates a new carrier object.
On JDK 25+, this is a ScopedValue instance. On older JDKs, this is a ThreadLocal.
Instantiates a new carrier object. On JDK 25+, this is a ScopedValue instance. On older JDKs, this is a ThreadLocal.
(current-scope)Returns the current scope map, or an empty map if no scope is active.
Returns the current scope map, or an empty map if no scope is active.
(extend-current-scope bindings)Merge new bindings into the current scope.
Takes a flat vector of [var1 val1 var2 val2 ...] and returns a new scope map
with these bindings added to (or overriding) the current scope.
Merge new bindings into the current scope. Takes a flat vector of `[var1 val1 var2 val2 ...]` and returns a new scope map with these bindings added to (or overriding) the current scope.
(extend-scope scope bindings)Extend a scope map with new bindings.
Takes a scope map and a flat vector of [var1 val1 var2 val2 ...] and returns
a new scope map with these bindings added.
Extend a scope map with new bindings. Takes a scope map and a flat vector of `[var1 val1 var2 val2 ...]` and returns a new scope map with these bindings added.
(get-scoped-var v)Retrieve a scoped value, falling back to the var's root binding.
If the var is in the current scope, returns the scoped value. If not in scope, returns the var's current value. If the var is unbound and not in scope, throws IllegalStateException.
This is the runtime implementation for the ask macro.
Retrieve a scoped value, falling back to the var's root binding. If the var is in the current scope, returns the scoped value. If not in scope, returns the var's current value. If the var is unbound and not in scope, throws IllegalStateException. This is the runtime implementation for the `ask` macro.
(resolve-bindings bindings)Resolve symbols to vars in a bindings vector at compile time.
Transforms [sym1 val1 sym2 val2 ...] into [#'sym1 val1 #'sym2 val2 ...].
Resolve symbols to vars in a bindings vector at compile time. Transforms `[sym1 val1 sym2 val2 ...]` into `[#'sym1 val1 #'sym2 val2 ...]`.
(with-scope scope & body)Execute body with a pre-built scope map. Returns the value of body.
Execute body with a pre-built scope map. Returns the value of body.
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 |