Skip to content

Instantly share code, notes, and snippets.

@priort
Created December 30, 2018 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priort/7e3b423035b317ba2d304eff11c88fb1 to your computer and use it in GitHub Desktop.
Save priort/7e3b423035b317ba2d304eff11c88fb1 to your computer and use it in GitHub Desktop.
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