simon.vergauwen
fun <A, B, C> Either<A, B>.leftFlatmap(f: (A) -> Either<C, B>): Either<C, B> = when(this) { is Either.Left -> f(this.a) is Either.Right -> this }