unit std.core; // The default error set is open: `error.Name` names a member of it without // declaring one, and the build assigns the codes (SPEC 4.6). pub fn assert(ok: bool) -> void { if not ok { @trap(); } } pub fn min(a: i32, b: i32) -> i32 { if a < b { return a; } return b; } pub fn max(a: i32, b: i32) -> i32 { if a > b { return a; } return b; } pub fn abs(v: i32) -> i32 { if v < 0 { return 0 - v; } return v; }