PairK

public final class PairK<F, G, A> : PairKOf<F, G, A>

PairK is a product type for kinds. Represents a type where you hold both a Kind<F, A> and a Kind<G, A>.

  • Safe downcast.

    Declaration

    Swift

    public static func fix(_ fa: PairKOf<F, G, A>) -> PairK<F, G, A>

    Parameters

    fa

    Value in the higher-kind form.

    Return Value

    Value cast to PairK.

  • Initialises a PairK from two values.

    Declaration

    Swift

    public init(_ fa: Kind<F, A>, _ ga: Kind<G, A>)

    Parameters

    fa

    Value of the first component of the pair.

    ga

    Value of the second component of the pair.

  • Initialises a PairK from a Pair.

    Declaration

    Swift

    public init(_ pair: Pair<Kind<F, A>, Kind<G, A>>)

    Parameters

    pair

    Pair value to initialise this PairK.

  • Initialises a PairK from the provided values lifting them to F and G.

    Declaration

    Swift

    public convenience init(_ a1: A, _ a2: A)

    Parameters

    a1

    Value of the first component of the pair.

    a2

    Value of the second component of the pair.