Expand description
Stub types for Phase 4/7 that are referenced by the Value enum.
Structs§
- Agent
- A Clojure agent — asynchronous state update queue.
- Atom
- A Clojure atom — a thread-safe mutable reference.
- BoundFn
- A function wrapped with captured dynamic bindings. When called, the captured bindings are pushed as a frame before delegating to the wrapped function. This means captured bindings override the caller’s for the same var, but vars not in the capture fall through normally.
- Cljx
Cons - A lazy cons cell: head element + tail (may be a
LazySeq,List, orNil). - CljxFn
- An interpreted Clojure closure with captured environment.
- Cljx
FnArity - One arity branch of a Clojure function.
- Cljx
Future - A future value computed asynchronously on another thread.
- Cljx
Promise - A one-shot rendezvous (promise).
- Delay
- A lazy one-time computation (forced at most once, result cached).
- LazySeq
- A lazy sequence that forces its thunk exactly once and caches the result.
- MultiFn
- A Clojure multimethod — arbitrary dispatch via a user-supplied function.
- Namespace
- A Clojure namespace with intern table, refers, and aliases.
- Native
Fn - Protocol
- A Clojure protocol — an interface-like construct with named methods.
- Protocol
Fn - Callable that dispatches a single protocol method on the type of
args[0]. - Protocol
Method - One method signature declared in a
defprotocol. - Var
- A Clojure var — a namespace-interned mutable root binding.
- Volatile
- Non-atomic mutable cell (single-thread performance, no CAS).
Enums§
- Agent
Msg - Messages sent to an agent’s worker thread.
- Arity
- Delay
State - Internal state of a delay cell.
- Future
State - Thread-pool future state.
- Lazy
SeqState - Internal state of a lazy sequence cell.
Traits§
- Thunk
- A deferred computation that produces a
Valuewhen forced.
Type Aliases§
- AgentFn
- A Clojure agent action: takes the current state, returns the new state.
- Method
Map - Inner map type for protocol implementations: method_name → impl fn.
- Native
FnFunc - The callable stored inside a
NativeFn. Supports both bare function pointers and closures that capture state. - Native
FnPtr - A Rust function callable from Clojure.
Legacy type alias kept for source compatibility. Bare
fnpointers implementFnand can be passed anywhere aNativeFnFuncis expected.