Hmmmm… a Coproduct store one of the given types or...
# arrow
e
Hmmmm… a Coproduct store one of the given types or can store one of each????…. I mean given
typealias LoginResponse = Coproduct4<FatalLoginProblem, WrongCredentials, LoginNeedsMore, SuccessCompletedLogin>
a
LoginResponse
is only 1 of the 4 types or I should create
Unit
onto the useless. PD: I think as we use
First(FatalLoginProblem())
the answer is it holds just 1, but I am not sure because of the fold syntax where I always should use all “branches” for the coproduct.