protocol _Incrementable

This protocol is an implementation detail of ForwardIndexType; do not use it directly.

Its requirements are inherited by ForwardIndexType and thus must be satisfied by types conforming to that protocol.

Inheritance Equatable View Protocol Hierarchy →
Import import Swift

Instance Methods

func ==(_:rhs:) Required

Return true if lhs is equal to rhs.

Equality implies substitutability. When x == y, x and y are interchangeable in any code that only depends on their values.

Class instance identity as distinguished by triple-equals === is notably not part of an instance's value. Exposing other non-value aspects of Equatable types is discouraged, and any that are exposed should be explicitly pointed out in documentation.

Equality is an equivalence relation

  • x == x is true
  • x == y implies y == x
  • x == y and y == z implies x == z

Inequality is the inverse of equality, i.e. !(x == y) iff x != y.


func ==(lhs: Self, rhs: Self) -> Bool

Declared In

func successor() Required

Return the next consecutive value in a discrete sequence of Self values.

Requires: self has a well-defined successor.


func successor() -> Self