Created
August 7, 2014 16:23
-
-
Save bvenners/2c950912dda72dc58e9b 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
case class Plan(estimate: Int, strategy: String) | |
case class Concept(idea: String) | |
case class Project(concept: Concept, plan: Plan) | |
def workOn(project: Project): String = | |
project match { | |
case Project(con @ Concept("fool people"), _) => | |
"can't fool me with : " + con | |
case proj @ Project(_, plan @ Plan(len, _)) if len > 10 => | |
"that's going to take too long: " + plan | |
case Project(Concept(idea), Plan(len, strategy)) => | |
s"I like your idea, $idea, and your strategy, $strategy, seems sound, but can you really do it in $len months?" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment