|
Scala example source code file (ValidationOps.scala)
The ValidationOps.scala Scala example source codepackage scalaz package syntax final class ValidationOps[A](val self: A) extends AnyVal { def success[X]: Validation[X, A] = Validation.success[X, A](self) def successNel[X]: ValidationNel[X, A] = success def failure[X]: Validation[A, X] = Validation.failure[A, X](self) def failureNel[X]: ValidationNel[A, X] = Validation.failureNel[A, X](self) } trait ToValidationOps { implicit def ToValidationOps[A](a: A) = new ValidationOps(a) } Other Scala examples (source code examples)Here is a short list of links related to this Scala ValidationOps.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.