SemigroupK

public protocol SemigroupK

SemigroupK is a Semigroup that operates on kinds with one type parameter.

  • Combines two values of the same type in the context implementing this instance.

    Implementations of this method must obey the associative law:

    combineK(fa, combineK(fb, fc)) == combineK(combineK(fa, fb), fc)
    

    Declaration

    Swift

    static func combineK<A>(_ x: Kind<Self, A>, _ y: Kind<Self, A>) -> Kind<Self, A>

    Parameters

    x

    Left value in the combination.

    y

    Right value in the combination.

    Return Value

    Combination of the two values.