fold

inline fun <L, R, T> Either<L, R>.fold(fLeft: (L) -> T, fRight: (R) -> T): T

Applies fLeft if this is Either.Left or fRight if this is Either.Right.

Important: This is a Public Preview API. It may be changed or removed at any time.