Created
June 27, 2018 01:51
-
-
Save jungbin-kim/83a7094ae88b3dc0480917658a8ae876 to your computer and use it in GitHub Desktop.
Scala Map iteration
This file contains 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
val s = Map( | |
("Bottle", 355) -> Seq(1,2), | |
("Can", 500) -> Seq(1,2) | |
) | |
for { | |
((container, volume), value) <- s | |
} yield { | |
println(container, volume, value) | |
container | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment