If the condition is true then return rightValue in Right else leftValue in Left
rightValue
leftValue
static Either<L, R> cond<L, R>(bool test, L leftValue, R rightValue) => test ? Right(rightValue) : Left(leftValue);