{ val mail = inputMail.eitherMail() val number = inputNumber.eitherPhoneNumber() return Either.applicative<String>().map(mail, number) { Data(it.a, it.b) } }
{ val mail = inputMail.validatedMail() val phoneNumber = inputNumber.validatedPhoneNumber() val SE = Nel.semigroup<ValidationError>() return Validated.applicative(SE).map(mail, phoneNumber) { Data(it.a, it.b) } }