Skip to content

Instantly share code, notes, and snippets.


priort/CreatePianoTrio2.scala Secret

Created Dec 30, 2018
What would you like to do?
def createPianoTrio(pianoPlayerName:String, bassPlayerName:String, drummerName:String): Option[PianoTrio] =
for {
pp <- PianoPlayer(pianoPlayerName)
bp <- BassPlayer(bassPlayerName)
d <- Drummer(drummerName)
} yield PianoTrio(pp, bp, d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment