builtins

package
v1.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package builtins is the single-source home for direct-call-eligible clojure.core builtins: context-free functions with uniform vm.Value signatures. Each function here is meant to be BOTH the interpreter registration (lang.go boxes it) AND the AOT direct-call target (lang.go registers it as a native module, generated code calls builtins.X directly).

It imports ONLY vm (never rt) so rt/lang.go can import it without a cycle — that layering is what lets lang.go register from these funcs instead of duplicating their bodies (the corefns/diff-test pattern this replaces).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cons

func Cons(elem, coll vm.Value) (vm.Value, error)

Cons mirrors clojure.core/cons — `(cons x coll)`.

func Contains

func Contains(coll, k vm.Value) (vm.Value, error)

Contains mirrors clojure.core/contains? — `(contains? coll k)`.

func Not

func Not(v vm.Value) (vm.Value, error)

Not mirrors clojure.core/not — `(not x)`.

func Vector

func Vector(args ...vm.Value) (vm.Value, error)

Vector mirrors clojure.core/vector — `(vector & xs)`. Builtin is vm.NativeFnType.WrapNoErr(vm.NewArrayVector); same delegation as List.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL