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
caseclassMonad[A](v: A):defmap[B](f: A=>B):Monad[B] = flatMap(a =>Monad(f(a)))
defflatMap[B](f: A=>Monad[B]):Monad[B] =???objectTest {
for
x <-Monad(42) // OKyield x
forgivenx<-Monad(42) // value withFilter is not a member of Monad[A]yield x
}
Output
value withFilter is not a member of Monad[A]
where:A is a typevariablewith constraint >: (42:Int)
Expectation
Successful compilation
The text was updated successfully, but these errors were encountered:
Compiler version
3.0.0-RC3
Minimized code
Output
Expectation
Successful compilation
The text was updated successfully, but these errors were encountered: