Slackbot
05/03/2020, 1:02 PMmelatonina
05/03/2020, 1:26 PMGopal S Akshintala
05/03/2020, 1:27 PMreified
, but couldn’t figure out how to apply in this contextmelatonina
05/03/2020, 1:28 PMmelatonina
05/03/2020, 1:32 PMreified
would help.Gopal S Akshintala
05/03/2020, 1:34 PMValidatedPartialOf
and EitherPartialOf
and pass repo
as function parametermelatonina
05/03/2020, 1:35 PMinterface EffectValidatorErrorAccumulation<F, E> : EffectValidator<F, ValidatedPartialOf<Nel<E>>, E>
interface EffectValidatorFailFast<F, E> : EffectValidator<F, EitherPartialOf<Nel<E>>, E>
melatonina
05/03/2020, 1:42 PMGopal S Akshintala
05/03/2020, 2:30 PMvalidatorAE
and so bind()
won’t give me the flatMap
effect. So another problem on top this, I think I need a Monad Transformer 🤔
fun <F> EffectValidatorFailFast<F, ValidationError>.validateUserWithRules(user: User): Kind<F, Kind<EitherPartialOf<Nel<ValidationError>>, Boolean>> = fx.async {
validatorAE.run {
cityShouldBeValid(user).bind()
loginShouldNotExit(user).bind()
}
}