-
Left side of this value.
Declaration
Swift
public let left: Kind<F, V>
-
Right side of this value.
Declaration
Swift
public let right: Kind<G, V>
-
Selected side.
Declaration
Swift
public let side: Side
-
Safe downcast.
Declaration
Swift
public static func fix(_ value: SumOf<F, G, V>) -> Sum<F, G, V>
Parameters
value
Value in the higher-kind form.
Return Value
Value cast to Sum.
-
Changes the selected side.
Declaration
Swift
public func change(side: Side) -> Sum<F, G, V>
Parameters
side
New selected side.
Return Value
A new Sum with the same contents and the new selected side.
-
Converts this Sum to an EitherK.
Declaration
Swift
public func lower() -> EitherK<F, G, V>
Return Value
An EitherK.left if the left side of the Sum is selected, or an EitherK.right otherwise.
-
Obtains the left side.
Declaration
Swift
public func lowerLeft() -> Kind<F, V>
Return Value
Left side of the Sum.
-
Obtains the right side.
Declaration
Swift
public func lowerRight() -> Kind<G, V>
Return Value
Right side of the Sum.
-
Extracts the value inside the comonadic value that is not selected.
Declaration
Swift
func extractOther() -> V
Return Value
Value contained in the not selected comonadic value.