Multipliable

public protocol Multipliable[Other = Self]

Raw protocol backing the * operator.

The associated one value is the multiplicative identity, used as the starting accumulator for products and powers.

Examples

6 * 7 // 42 Int64.one // 1

Properties

static var one: Self { get }

The multiplicative identity — a value o such that x * o == x for all x.

Associated Types

type Output

Methods

consuming func multiply(consuming Other) -> Output

Returns self * other.

Defined in lang/std/core/arithmetic.ks