cats.applicative.validation
The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.
branch
(branch v fail-f ok-f)
Given a validation value and two functions, if the validation is a failure apply the first function to the value it contains; if the validation is a success apply the second function to its value.
branch-fail
(branch-fail v fail-f)
Given a validation value and a function, if the validation is a failure, apply the function to the value it contains; if the validation is a success, return it.
branch-ok
(branch-ok v ok-f)
Given a validation value and a function, if the validation is a success, apply the function to the value it contains; if the validation is a failure, return it.