EquatableK

public protocol EquatableK

EquatableK provides capabilities to check equality of values at the kind level.

  • Checks if two kinds are equal, given that the enclosed value type conforms to Equatable.

    Implementations of this method must obey the following laws:

    1. Identity

      eq(fa, fa) == true
      
    2. Symmetry

      eq(fa, fb) == eq(fb, fa)
      
    3. Transitivity

      eq(fa, fb) ^ eq(fb, fc) -> eq(fa, fc)
      

    Declaration

    Swift

    static func eq<A>(_ lhs: Kind<Self, A>, _ rhs: Kind<Self, A>) -> Bool where A : Equatable

    Parameters

    lhs

    Left hand side of the equality check.

    rhs

    Right hand side of the equality check.

    Return Value

    A boolean value indicating if the two values are equal or not.