SignedInteger

public protocol SignedInteger

Marker protocol for signed integer types. The abs() requirement is what justifies treating these uniformly in generic code — unsigned integers can't satisfy it without changing semantics.

Methods

func abs() -> Self

Absolute value. For two's-complement types this can overflow at minValue; consumers that need a total function should use absChecked() from the concrete type instead.

Defined in lang/std/numeric/numeric.ks