least
fn · Source line 16
pub fn least(a: int, b: int) -> intLeast of two ints; returns b when they are equal. Total: no error row, no traps.
prelude.least(3, 7) == 3wolf-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
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.
No public declarations in this section.
fn · Source line 16
pub fn least(a: int, b: int) -> intLeast of two ints; returns b when they are equal. Total: no error row, no traps.
prelude.least(3, 7) == 3fn · Source line 26
pub fn greatest(a: int, b: int) -> intGreatest of two ints; returns b when they are equal. Total: no error row, no traps.
prelude.greatest(3, 7) == 7fn · Source line 38
pub fn magnitude(n: int) -> intMagnitude 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) == 9No public declarations in this section.
No public declarations in this section.