Bare Built-in Functions

These functions are available without any module prefix. They form the core primitives of the Kit language and are always in scope.

Looking for Module Functions?

For module-prefixed functions like List.map, String.split, Map.get, and others, see the Standard Library Overview.

Bare vs Module Functions

Many functions like map, filter, and fold are available both as bare functions and as module-prefixed versions (e.g., List.map). The module versions often have different argument order optimized for piping with |>.

Arithmetic

add sub mul div mod neg

Also available via operators: +, -, *, /, %

Comparison

eq ne neq lt gt le ge lte gte compare

Also available via operators: ==, !=, <, >, <=, >=

Boolean

and or not

Also available via operators: &&, ||, !

I/O

print println write

See also: StdOut, StdErr, StdIn, File

Conversion

to-str to-string format show

Type Checking

type-of type-sig is-int? is-float? is-bigint? is-str? is-string? is-list? is-bool? is-map? is-record? is-tuple? is-function? is-constructor? is-unit? is-some? is-none? is-ok? is-err? is-left? is-right? is-even? is-odd?

Control Flow

panic tag-eq? tag-value lazy force

List Operations

length len count head tail first last rest empty? cons reverse concat append flatten take drop nth slice-from sum product range vec-range map filter fold reduce each zip-with contains?

See also: List module for full documentation

Math Operations

sqrt floor ceil round abs pow sin cos tan log exp min max

See also: Math module for constants and more functions

String Operations

lines chars unlines

See also: String module for full documentation