Slide 37
Slide 37 text
for-comprehensionͰ
ύλʔϯϚονͰ͖ͳ͍
Right((1, 2)).right.filter(_ match {
case (_, _) => true
case _ => false
}).map(_ match {
case (a, b) => a + b
})
:19: error: constructor cannot be instantiated
to expected type;
found : (T1, T2)
required: scala.util.Either[Nothing,(Int, Int)]
(a, b) <- Right((1, 2)).right
^
Either[Nothing, (Int, Int)]