Contravariant

public protocol Contravariant : Invariant

Undocumented

  • Undocumented

    Declaration

    Swift

    static func contramap<A, B>(_ fa: Kind<Self, A>, _ f: @escaping (B) -> A) -> Kind<Self, B>
  • imap(_:_:_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func imap<A, B>(_ fa: Kind<Self, A>, _ f: @escaping (A) -> B, _ g: @escaping (B) -> A) -> Kind<Self, B>
  • contralift(_:) Extension method

    Undocumented

    Declaration

    Swift

    public static func contralift<A, B>(_ f: @escaping (A) -> B) -> (Kind<Self, B>) -> Kind<Self, A>