Skip to content

Instantly share code, notes, and snippets.

@lu4nm3
Created May 14, 2020 04:18
Show Gist options
  • Save lu4nm3/3ed060ceff0746dde14e88857000d498 to your computer and use it in GitHub Desktop.
Save lu4nm3/3ed060ceff0746dde14e88857000d498 to your computer and use it in GitHub Desktop.
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