x-lang

prims

The primitives catalog: an alist of (ns . ((method . impl) …)) domains.

The registry of stable implementation identities; modules fetch dependencies

from it at load instead of assuming ambient global names.

Returns: LIST — The live catalog alist

See also: prim-ref

prim-domain

The method alist filed under a catalog namespace, or nil.

Parameters:

Returns: LIST — ((method . impl) …) for the namespace, or nil

See also: prims

prim-ref

Fetch the implementation filed under ns/method, or nil.

The consumer half of the registry protocol. Fetch at module load and

cache in a lexical (hot paths) or call inline (cold paths).

Parameters:

Returns: ANY — The registered implementation, or nil if absent

Examples:

(prim-ref 'int '+) => #<prim>

See also: prim-reg!