Skip to content

Instantly share code, notes, and snippets.

@dwins
Created August 31, 2011 12:34
Show Gist options
  • Save dwins/1183432 to your computer and use it in GitHub Desktop.
Save dwins/1183432 to your computer and use it in GitHub Desktop.
sealed trait Breakfast {
def beverage: String
def dish: String
}
object LumberJack extends Breakfast {
val beverage = "black coffee"
val dish = "ham and eggs
}
object Toddler extends Breakfast {
val beverage = "milk"
val dish = "sugar cereal"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment