Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> val a, b: Either[String, Int] = Right(1)
- a: Either[String,Int] = Right(1)
- b: Either[String,Int] = Right(1)
- scala> for { aa <- a.right
- | bb <- b.right
- | } yield aa + bb
- res4: Either[String,Int] = Right(2)
Add Comment
Please, Sign In to add comment