prim-reg!File an x-lang value into the catalog under ns/method.
The producer half of the registry protocol: library implementations register
under the same stable identities as C prims. Registration prepends, so a
re-registration shadows the older entry on lookup. Returns nil.
Parameters:
SYMBOL — Namespace symbol, e.g. ‘floatSYMBOL — Method symbol, e.g. ‘+ANY — The implementation to register (fn, op, or any value)Examples:
(do (prim-reg! 'demo 'twice (fn (_ n) (* n 2))) ((prim-ref 'demo 'twice) 21)) => 42See also: prim-ref