Last active
December 15, 2017 17:47
-
-
Save madeleine-chercover-hs/18c69e05137b98b1aa584f7f69d10df1 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
def eatVegetable(vegetable: Vegetable): String = | |
vegetable match { | |
case ChocolateCake(layers, _) if layers > 3 => | |
"Now that's what I call a cake - I mean vegetable." | |
case _ => | |
"No, thank you." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment