Skip to content

Instantly share code, notes, and snippets.

@priort
Created December 30, 2018 11:10
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/0d6539642546e4153880e1d18cb530a2 to your computer and use it in GitHub Desktop.
Save priort/0d6539642546e4153880e1d18cb530a2 to your computer and use it in GitHub Desktop.
object Actions {
import MISU.Domain._
def getBandLeaderName(jazzBand: JazzBand) =
jazzBand match {
case PianoTrio(PianoPlayer(pianoPlayerName), _, _) => pianoPlayerName
case Quartet(TrumpetPlayer(trumpetPlayerName), _, _, _) => trumpetPlayerName
case Quintet(SaxPlayer(saxPlayerName), _, _, _, _) => saxPlayerName
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment