Alex Johnson
12/18/2020, 7:41 PMsuspend fun validateAndSave(a: RequestA): Either<Error, ModelA> = either {
val validA = validate(a).bind()
save(validA).bind()
}
would this be translated to the following and is that the expected route to take or is there some other syntacical sugar I can take advantage of?
suspend fun validateAndSave(a: RequestA): Either<Error, ModelA> = either {
val validA = validate(a)()
save(validA)()
}
raulraja
12/19/2020, 12:28 PM