Skip to content

Built-ins

The standard library installs 214 primitives organized into 13 packages (snapshot from projects/omega-lisp/CLAUDE.md). This page is a representative slice; use :primitives and :doc <fn> in the REPL for authoritative, current signatures.

core (37 primitives — selection)

+ - * / mod quotient remainder
= < > <= >= eq? equal?
not and or
list cons car cdr caar cadr cdar cddr null? pair? list?
length reverse append
display newline print
number? string? symbol? procedure? boolean? char?
zero? positive? negative? odd? even?
abs min max

strings (21)

string string? string-length string-ref string=?
string-append substring string-split string-join
string-upcase string-downcase string-trim
char->string string->list list->string
string->number number->string
string-contains? string-replace
format

hof (14)

map filter fold reduce
for-each every? any?
compose pipe identity const
flip curry

streams (12)

cons-stream stream-car stream-cdr stream-null?
stream-take stream-drop stream-filter stream-map
the-empty-stream stream-for-each stream->list integers

lazy (4)

delay force promise? memo

distributions (10)

dist dist? dist-empty
dist-add dist-normalize dist-sample dist-top-k
dist-from list->dist dist-merge

data-directed (16)

make-tagged tagged? tagged-value tagged-tag
make-generic generic? define-method get-method
dispatch-apply tag-of
;; ... plus generic-registry primitives

trs (9)

make-rule rule? rule-lhs rule-rhs
rewrite-once rewrite-fixpoint match-rule

meta (26)

make-evaluator eval-in extend-evaluator
machine-from-expr machine-step machine-fork machine-stack
machine-eval-at machine-resume machine-done?
register-macro make-transformer
ctx/snapshot ctx/extend ctx/seal
;; ... and module/profile primitives

conditions (7)

make-condition condition? condition-kind condition-message
signal raise handler-case

provenance (5)

receipt? receipt-evidence
make-evidence evidence-id compute-source-hash

solver (22)

net/new net/run net/status
make-connector make-propagator
add-constraint contradiction? contradiction-explain
;; ... plus repair, unsat-core, etc.

solve (31)

solve goal artifact decompose
delegate combine verify
;; ... plus the HETA family of recursive decomposition primitives

How to find more

:primitives                 ; list all 13 packages with primitive counts
:help <package>             ; tutorial-format help for a package
:doc <name>                 ; one-screen reference for a primitive
:apropos <pattern>          ; search by name or description

The help system source is projects/omega-lisp/src/core/help/ (functions: getPackages, getPrimitive, searchPrimitives, loadPackageDocs, handleAproposCommand, handleHelpPackageCommand, handleManCommand).

Effect built-ins

These are not "primitives" in the same sense — they're effect ops dispatched via (effect op args...). Common ones:

infer.op           ; LLM inference
infer-stream.op    ; streaming inference
agent.spawn.op     ; spawn an agent session
agent.run.op       ; run an agent
file.read.op       ; read a file
shell.op           ; run a shell command
build.run.op       ; run npm/pnpm build with structured error capture
chatgpt.infer.op   ; via ChatGPT browser transport
callback.eval_lisp ; OPR re-entry — kernel asks Lisp to evaluate
callback.artifact.get
callback.facts.query
callback.hash

The available effect ops depend on which EffectBackend the runtime is wired to.

See also

Source: projects/omega-lisp/src/core/prims.ts (primitive installation), projects/omega-lisp/CLAUDE.md § Primitive Discovery (canonical 13-package count list).