Created
March 21, 2020 21:08
-
-
Save robhinds/5bb86823bc2f98c339eb953a81be3090 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait DefaultValidation extends Poly1 { | |
implicit def default[T] = at[T](x => true) | |
} | |
object validates extends DefaultValidation { | |
implicit def caseValidated[A](implicit v: ValidatorTypeClass[A]) = at[A](x => v.validate(x)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment