Created
May 14, 2020 04:18
-
-
Save lu4nm3/3ed060ceff0746dde14e88857000d498 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
object Perishables { | |
implicit val baguettePerishable: Perishable[Baguette] = new Perishable[Baguette] { | |
def expired(b: Baguette): Boolean = false // hard coded, in reality we would examine `b` to figure out if it expired | |
} | |
implicit val croissantPerishable: Perishable[Croissant] = new Perishable[Croissant] { | |
def expired(c: Croissant): Boolean = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment