假設你有一個看起來像這樣的EitherT: type StateListOfString[+T] = State[List[String], T]
type MyEitherT = EitherT[StateListOfString, Int, Boolean]
如果你有一個換理解,可以返回左: my computation = for {
a <- thingThatCouldR
我偶爾會打這樣的代碼: val things : List[A \/ B] = ???
val (as, bs) : (List[A], List[B]) = ??? //insert something to do this
或在我目前的情況下,我想Map[A, B \/ C] => (Map[A, B], Map[A, C]) 有一個很好的方法可以在一般情況下做到這一點F[A \/ B]