Created
February 9, 2018 21:31
-
-
Save bandrzejczak/8e5fcb461352327a2b097742dea1549d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def getSongLength( | |
| artist: Artist, | |
| albumName: String, | |
| songName: String): Option[Int] = { | |
| for { | |
| album <- artist.getAlbum(albumName) | |
| song <- album.getSong(songName) | |
| } yield song.getLength | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment