Last active
December 15, 2017 21:45
-
-
Save madeleine-chercover-hs/e7a20b330eaba95c6ab897e066f669f4 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 abstract class Vegetable | |
case class Pea(colour: String, isCooked: Boolean) extends Vegetable | |
case class Eggplant(colour: String, weight: Int) extends Vegetable | |
case class ChocolateCake(layers: Int, isVegetable: Boolean = true) extends Vegetable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment