You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Responses are therefore represented as a stack of monads:
type Response[A] = Future[Either[String, A]]
and methods getPowerLevel and canSpecialMove both return Response.
However, the solution redefines the Response[A] type:
type Response[A] = EitherT[Future, String, A]
This is very misleading. Using the Response shown in the problem description, there's no monad stack involved, and it is difficult to understand what the exercise wants.
IMO, it'll be clearer if the Response type definition is left as an exercise for students, with the requirement that the stack is of type Future[Either[String, *]].
The text was updated successfully, but these errors were encountered:
The problem description states:
and methods
getPowerLevel
andcanSpecialMove
both returnResponse
.However, the solution redefines the
Response[A]
type:This is very misleading. Using the
Response
shown in the problem description, there's no monad stack involved, and it is difficult to understand what the exercise wants.IMO, it'll be clearer if the
Response
type definition is left as an exercise for students, with the requirement that the stack is of typeFuture[Either[String, *]]
.The text was updated successfully, but these errors were encountered: