Skip to content

Instantly share code, notes, and snippets.

@priort

priort/CreatePianoTrio2.scala Secret

Created Dec 30, 2018
Embed
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
You can’t perform that action at this time.