Skip to content

Instantly share code, notes, and snippets.

@longliveenduro
Created January 3, 2014 16:52
Show Gist options
  • Select an option

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

Select an option

Save longliveenduro/8241471 to your computer and use it in GitHub Desktop.
val success1 = 1.success[String]
val failure1 = "failure1".failure[Int]
val failure2 = "failure2".failure[Int]
// use +++ on Validation
val result = success1.toValidationNel +++
failure1.toValidationNel +++
failure2.toValidationNel
// result is Failure(NonEmptyList(failure1, failure2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment