Skip to content

Instantly share code, notes, and snippets.

@benjumanji
Created June 5, 2014 20:56
Show Gist options
  • Save benjumanji/3143d855d79b8843aa2d to your computer and use it in GitHub Desktop.
Save benjumanji/3143d855d79b8843aa2d to your computer and use it in GitHub Desktop.
this is a joke, surely.
object Hi {
def main(args: Array[String]) = {
println(testing)
}
def testing : Either[String, String] = {
val eitherString1 = Right("lol")
val eitherString2 = Right("YOLO", 7)
for {
s1 <- eitherString1.right
(s2, _) <- eitherString2.right
} yield s1 ++ s2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment