Created
May 14, 2020 04:23
-
-
Save lu4nm3/fb37836d549813400a23e59cd4d4d934 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| trait GlutenFree[T] { | |
| def isGlutenFree(item: T): Boolean | |
| } | |
| object GlutenFree { | |
| implicit val baguetteGlutenFree: GlutenFree[Baguette] = new GlutenFree[Baguette] { | |
| def isGlutenFree(b: Baguette): Boolean = true | |
| } | |
| implicit val croissantGlutenFree: GlutenFree[Croissant] = new GlutenFree[Croissant] { | |
| def isGlutenFree(c: Croissant): Boolean = true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment