Created
January 18, 2017 15:41
-
-
Save kevinmeredith/b4b3e35bf7bfadce253a8d74aef1c7ef to your computer and use it in GitHub Desktop.
var args
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
| scala> import scala.collection.immutable.ListMap | |
| import scala.collection.immutable.ListMap | |
| scala> ListMap[Int, String]( (42, "hi"), (66, "world") ) | |
| res1: scala.collection.immutable.ListMap[Int,String] = Map(42 -> hi, 66 -> world) | |
| scala> val list: List[(Int, String)] = List( (42, "hi"), (66, "world") ) | |
| list: List[(Int, String)] = List((42,hi), (66,world)) | |
| scala> ListMap[Int, String]( list: _* ) | |
| res2: scala.collection.immutable.ListMap[Int,String] = Map(42 -> hi, 66 -> world) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment