arrow-generic / arrow.generic.coproduct4 / Coproduct4

Coproduct4

sealed class Coproduct4<A, B, C, D>

Represents a sealed hierarchy of 4 types where only one of the types is actually present.

Extension Functions

fold fun <A, B, C, D, RESULT> Coproduct4<A, B, C, D>.fold(a: (A) -> RESULT, b: (B) -> RESULT, c: (C) -> RESULT, d: (D) -> RESULT): RESULT
Runs the function related to the actual value of the Coproduct and returns the result
select fun <A> Coproduct4<A, *, *, *>.select(): Option<A>
fun <B> Coproduct4<*, B, *, *>.select(dummy0: Unit = Unit): Option<B>
fun <C> Coproduct4<*, *, C, *>.select(dummy0: Unit = Unit, dummy1: Unit = Unit): Option<C>
fun <D> Coproduct4<*, *, *, D>.select(dummy0: Unit = Unit, dummy1: Unit = Unit, dummy2: Unit = Unit): Option<D>
Transforms the Coproduct into an Option based on the actual value of the Coproduct

Inheritors

First data class First<A, B, C, D> : Coproduct4<A, B, C, D>
Represents the first type of a Coproduct4
Fourth data class Fourth<A, B, C, D> : Coproduct4<A, B, C, D>
Represents the fourth type of a Coproduct4
Second data class Second<A, B, C, D> : Coproduct4<A, B, C, D>
Represents the second type of a Coproduct4
Third data class Third<A, B, C, D> : Coproduct4<A, B, C, D>
Represents the third type of a Coproduct4