Standard Library

Runtime functions loaded at startup after primitives.

Type predicates

nil? src
error

Exported functions: - Higher-order: map, filter, fold, reduce, keep - Combinators: identity, complement, constantly, compose, comp, partial, juxt - Predicates: all?, any?, some, none? - Search: find, find-index, index-of, last-index-of - Transformation: flatten, group-by, partition, take-while, drop-while - Struct operations: merge - Stream sinks: stream/for-each, stream/fold, stream/collect, stream/into-array - Stream transforms: stream/map, stream/filter, stream/take, stream/drop, stream/concat, stream/zip, stream/pipe - Stream ports: port/lines, port/chunks, port/writer - Subprocess convenience: subprocess/system

integer? src
error
float? src
error
boolean? src
error
keyword? src
error
native-fn? src
error
closure? src
error
fiber? src
error
box? src
error
parameter? src
error
number? src
error
string? src
error
bytes? src
error
array? src
error
struct? src
error
set? src
error
fn? src
error
mutable? src
error
immutable? src
error
pair? src
error
list? src
error
symbol? src
error
even? src
error
odd? src
error
abs src
erroros-signalhaltyieldgpuffiexeciodebugfs
floor src
erroros-signalhaltyieldgpuffiexeciodebugfs
ceil src
erroros-signalhaltyieldgpuffiexeciodebugfs
round src
erroros-signalhaltyieldgpuffiexeciodebugfs
zero? src
error
nonzero? src
error
nan? src
error
finite? src
erroros-signalhaltyieldgpuffiexeciodebugfs
inf? src
erroros-signalhaltyieldgpuffiexeciodebugfs
pos? src
erroros-signalhaltyieldgpuffiexeciodebugfs
neg? src
erroros-signalhaltyieldgpuffiexeciodebugfs
min src
erroros-signalhaltyieldgpuffiexeciodebugfs
max src
erroros-signalhaltyieldgpuffiexeciodebugfs
not= src
error
nonempty? src
error
compare src
erroros-signalhaltyieldgpuffiexeciodebugfs
range src
erroros-signalhaltyieldgpuffiexeciodebugfs
assert src
error
xor src
error
take src
erroros-signalhaltyieldgpuffiexeciodebugfs
drop src
erroros-signalhaltyieldgpuffiexeciodebugfs

Arithmetic

+ src
error
- src
error
* src
error
/ src
error

The div-family wrappers dispatch the divisor on type-of: an INTEGER divisor is zero-guarded (the guard's fall-through proves it nonzero, which is what lets the silent %div/%rem lower); a FLOAT divisor divides directly under IEEE semantics (±inf/NaN) — the float arm's narrowing is the proof the intrinsic's float exemption accepts.

rem src
error
mod src
error

Comparison

check-comparable src
error
lt-pair src
erroros-signalhaltyieldgpuffiexeciodebugfs
gt-pair src
erroros-signalhaltyieldgpuffiexeciodebugfs
le-pair src
erroros-signalhaltyieldgpuffiexeciodebugfs
ge-pair src
erroros-signalhaltyieldgpuffiexeciodebugfs
< src
erroros-signalhaltyieldgpuffiexeciodebugfs
> src
erroros-signalhaltyieldgpuffiexeciodebugfs
<= src
erroros-signalhaltyieldgpuffiexeciodebugfs
>= src
erroros-signalhaltyieldgpuffiexeciodebugfs

Logic and pairs

not src
error
pair src
silent

Collection mutation

push src
error

The (match (type-of coll) …) arms route to the MONOMORPHIC data ops: each arm narrows coll to a concrete container family (:array → Array, :@array → MutableArray, etc.), which is exactly the static proof the silent monomorphic op demands (the operand contract in hir/typeinfer/contract.rs — check_intrinsic_operand_proofs — rejects an arm whose container is unproven). Routing is the legality vehicle: the arms type-check as silent leaves. It is not, on its own, a reclamation win at a push/put caller — the closure call convention is the residue there. The :@string arm routes to the monomorphic %string-push-mut (a -mut pass-through, so its stranded owned-param container is compensated like the @array/@struct/@set -mut arms); the immutable :string and both :bytes arms keep the polymorphic %string-push/%bytes-push (no monomorphic @bytes byte-copy variant exists yet); the _ fallbacks keep the polymorphic %array-push/%put.

put src
erroros-signalhaltyieldgpuffiexeciodebugfs
add src
error

Set add is set-only, so — like push — the _ arm ERRORS rather than delegating to a polymorphic fallback native. The two container arms route to the silent monomorphic %add-set/%add-set-mut, which the region solver collapses when the container type is statically proven (else the runtime match dispatches). Freezing the element is the funnel body's job (prim_add).

del src
error

Remove is struct+set only (an array/string has no key-remove), so — like add — the _ arm ERRORS. The container arms route to the silent monomorphic %del-struct/%del-struct-mut/%del-set/%del-set-mut, which the region solver collapses when the container type is statically proven (else the runtime match dispatches on the funnel body, prim_del). The -mut arms return their container pass-through; the wrapper's container compensation reclaims the owned-param reference they strand (like add/put/push).

pop src
error

Pop is a moves_out REMOVE that mutates in place and returns the removed ELEMENT (not the container), so — unlike push/add/del — it is MUTABLE-only: an immutable array/string/bytes has nothing to remove-in-place, so the _ arm ERRORS (there is no polymorphic fallback). The three container arms route to the silent monomorphic funnels %pop/%pop-string/%pop-bytes, which the region solver reaches on a proven container. The @array arm's %pop moves out a pre-existing heap element (its tail retain is suppressed as redundant); the @string/@bytes arms return a FRESH grapheme / immediate byte and keep theirs.

The trait arm every operator below carries

map src
erroros-signalhaltyieldgpuffiexeciodebugfs

The first clause is the per-operator method, which overrides the operator. The second drives :iter, and rebuilds through :Collection :empty/:conj when the operator answers with a collection of the same kind. A builtin family reaches neither: trait/op and trait/iterable? (src/primitives/traits.rs) answer nil and false for one. docs/traits.md § Collection operators.

filter src
erroros-signalhaltyieldgpuffiexeciodebugfs

Functional combinators

identity src
silent
complement src
silent
constantly src
silent
compose src
erroros-signalhaltyieldgpuffiexeciodebugfs
partial src
silent
juxt src
silent

Collection search & predicates

all? src
erroros-signalhaltyieldgpuffiexeciodebugfs
any? src
erroros-signalhaltyieldgpuffiexeciodebugfs
find src
erroros-signalhaltyieldgpuffiexeciodebugfs
find-index src
erroros-signalhaltyieldgpuffiexeciodebugfs
count src
erroros-signalhaltyieldgpuffiexeciodebugfs
nth src
error

Collection transforms

zip src
erroros-signalhaltyieldgpuffiexeciodebugfs
flatten src
erroros-signalhaltyieldgpuffiexeciodebugfs
take-while src
erroros-signalhaltyieldgpuffiexeciodebugfs
drop-while src
erroros-signalhaltyieldgpuffiexeciodebugfs
distinct src
erroros-signalhaltyieldgpuffiexeciodebugfs
frequencies src
erroros-signalhaltyieldgpuffiexeciodebugfs
mapcat src
erroros-signalhaltyieldgpuffiexeciodebugfs
group-by src
erroros-signalhaltyieldgpuffiexeciodebugfs
map-indexed src
erroros-signalhaltyieldgpuffiexeciodebugfs
partition src
erroros-signalhaltyieldgpuffiexeciodebugfs
interpose src
erroros-signalhaltyieldgpuffiexeciodebugfs
min-key src
erroros-signalhaltyieldgpuffiexeciodebugfs
max-key src
erroros-signalhaltyieldgpuffiexeciodebugfs
memoize src
silent
sort-by src
erroros-signalhaltyieldgpuffiexeciodebugfs
sort-by-builtin src
erroros-signalhaltyieldgpuffiexeciodebugfs
sort-with src
erroros-signalhaltyieldgpuffiexeciodebugfs
sort-with-builtin src
erroros-signalhaltyieldgpuffiexeciodebugfs

Time utilities

time/stopwatch src
error
time/elapsed src
error

VM query wrappers

call-count src
error
global? src
error
fiber/self src
error
fiber/new? src
error
fiber/alive? src
error
fiber/paused? src
error
fiber/dead? src
error
fiber/error? src
error
fiber/done? src
error
fiber-failed? src
error

Control flow graph rendering

fn/cfg src
erroros-signalhaltyieldgpuffiexeciodebugfs
fn/cfg-label src
error
fn/cfg-dot src
erroros-signalhaltyieldgpuffiexeciodebugfs
fn/cfg-mermaid src
erroros-signalhaltyieldgpuffiexeciodebugfs

Struct operations

merge src
erroros-signalhaltyieldgpuffiexeciodebugfs

Stream combinators

stream/for-each src
erroros-signalhaltyieldgpuffiexeciodebugfs
stream/fold src
erroros-signalhaltyieldgpuffiexeciodebugfs
stream/collect src
erroros-signalhaltyieldgpuffiexeciodebugfs
stream/into-array src
erroros-signalhaltyieldgpuffiexeciodebugfs
stream/map src
error
stream/filter src
error
stream/take src
error
stream/drop src
error
stream/concat src
error
stream/zip src
error
stream/pipe src
erroros-signalhaltyieldgpuffiexeciodebugfs
port/lines src
error
port/chunks src
error
port/writer src
error
tcp/connect src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
service-up? src
erroryieldio

Output

print src
erroros-signalhaltyieldgpuffiexeciodebugfs
println src
erroros-signalhaltyieldgpuffiexeciodebugfs
eprint src
erroros-signalhaltyieldgpuffiexeciodebugfs
eprintln src
erroros-signalhaltyieldgpuffiexeciodebugfs

Spawn

ev/spawn src
erroros-signalhaltyieldgpuffiexeciodebugfs

Async scheduler

make-async-scheduler src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/shutdown src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/report src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/step src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/with-scheduler src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/run src
erroros-signalhaltyieldgpuffiexeciodebugfs

Structured concurrency primitives

emit-wait src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/futex-wait src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/futex-wake src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/join src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/join-protected src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/abort src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/as-completed src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/select src
erroros-signalhaltyieldgpuffiexeciodebugfs
ev/race src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/timeout src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/scope src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/map src
waiterroros-signalhaltyieldgpuffiexeciodebugfs
ev/map-limited src
erroros-signalhaltyieldgpuffiexeciodebugfs

Channel select

chan/select src
erroros-signalhaltyieldgpuffiexeciodebugfs
sys/join src
erroros-signalhaltyieldgpuffiexeciodebugfs
inc src
error
dec src
error

Subprocess convenience

subprocess/system src
erroros-signalhaltyieldgpuffiexeciodebugfs

FFI helpers

ffi/pin src
erroros-signalhaltyieldgpuffiexeciodebugfs

Collection helpers

from-pairs src
erroros-signalhaltyieldgpuffiexeciodebugfs
get-in src
erroros-signalhaltyieldgpuffiexeciodebugfs
put-in src
erroros-signalhaltyieldgpuffiexeciodebugfs
update-in src
erroros-signalhaltyieldgpuffiexeciodebugfs
update src
erroros-signalhaltyieldgpuffiexeciodebugfs
sum src
erroros-signalhaltyieldgpuffiexeciodebugfs
product src
erroros-signalhaltyieldgpuffiexeciodebugfs