假設你有一個看起來像這樣的EitherT: type StateListOfString[+T] = State[List[String], T]
type MyEitherT = EitherT[StateListOfString, Int, Boolean]
如果你有一個換理解,可以返回左: my computation = for {
a <- thingThatCouldR
在Scalaz在object Need我發現 def apply[A](a: => A) = {
lazy val value0: A = a
new Need[A] {
def value = value0
}
}
什麼(更自然的對我來說) def apply[A](a: => A) = {
new Need[A] {
priva