-
-
Save priort/de8267c4e2461542e9b0ce4e8dba891f 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
object Domain { | |
case class Drummer private (name:String) { | |
def copy() = Drummer(name) | |
} | |
object Drummer { | |
def apply(name:String) = | |
List("Max Roache", "Tony Williams", "Elvin Jones").find(_ == name).map(new Drummer(_)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment