arrow-generic / arrow.generic.coproduct6 / fold

fold

fun <A, B, C, D, E, F, RESULT> Coproduct6<A, B, C, D, E, F>.fold(a: (A) -> RESULT, b: (B) -> RESULT, c: (C) -> RESULT, d: (D) -> RESULT, e: (E) -> RESULT, f: (F) -> RESULT): RESULT

Runs the function related to the actual value of the Coproduct and returns the result

Parameters

a - The function used to map A to the RESULT type

b - The function used to map B to the RESULT type

c - The function used to map C to the RESULT type

d - The function used to map D to the RESULT type

e - The function used to map E to the RESULT type

f - The function used to map F to the RESULT type

Return RESULT generated by one of the input functions