Skip to reference

std.prelude

wolf-std d58f9e1 · toolchain pin verified against wolf 0.2.41 (0261597). Source signatures and documentation; execution support is stated in each module.

All modules · Plain text · Stability tier: core

Module

std.prelude — the ambient facade, listed in one place (D31). Stability tier: core (the facade itself); contents below are sc00 SCAFFOLDING — three trivial functions that exist to prove the rig's staging loop end to end, replaced by the real facade listing when sc01 opens the language work. They follow API-CONVENTIONS.md so the first real module has a shaped example to copy.

Types and traits

No public declarations in this section.

Functions and methods

least

fn · Source line 16

pub fn least(a: int, b: int) -> int

Least of two ints; returns b when they are equal. Total: no error row, no traps.

prelude.least(3, 7) == 3

greatest

fn · Source line 26

pub fn greatest(a: int, b: int) -> int

Greatest of two ints; returns b when they are equal. Total: no error row, no traps.

prelude.greatest(3, 7) == 7

magnitude

fn · Source line 38

pub fn magnitude(n: int) -> int

Magnitude of n. Traps overflow at the minimum int, because the magnitude of int.min is not representable and arithmetic is checked in every profile (X3) — spell a wrapping intent explicitly if you mean one.

prelude.magnitude(0 - 9) == 9

Constants

No public declarations in this section.

Errors and row tags

No public declarations in this section.