Skip to content

Instantly share code, notes, and snippets.

@longliveenduro
Created January 3, 2014 15:28
Show Gist options
  • Select an option

  • Save longliveenduro/8239718 to your computer and use it in GitHub Desktop.

Select an option

Save longliveenduro/8239718 to your computer and use it in GitHub Desktop.
val right: \/[String, Int] = \/-(1)
val left: \/[String, Int] = -\/("errorMessage")
// or in another way (let the compiler infer the same types as above)
val right2 = 1.right[String]
val left2 = "errorMessage".left[Int]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment