Equal

public protocol Equal[Other = Self]

Raw protocol backing the == operator.

Most user code should conform to Equatable instead, which conforms to Equal[Self] automatically with Output = Bool. Implement Equal directly only when you need a non-Bool result (e.g. lifting equality into a vector type that returns a mask).

Examples

1 == 1 // true "a" == "b" // false

Associated Types

type Output

Methods

func equal(to: Other) -> Output

Returns the equality result as Output — typically Bool.

Defined in lang/std/core/comparison.ks