Trait Addpub

Source
:trait(pub) Add rhs result
  .+ ( Self rhs  result )
  .zero (  result )
Description

Binary addition. Produces a result type that may differ from Self and rhs (e.g. Int + Float → Float). .zero returns the additive identity for the result type.

Required Methods

.+ ( Self rhs result )

Add two values, producing a result whose type is determined by the impl.

.zero ( result )

The additive identity — value that leaves any sum unchanged.

Implementors

impl Add for Int

impl Add for Float

impl Add for Str