Last active
November 30, 2015 23:56
-
-
Save Allan-Gong/8ec59672b318bc97942b to your computer and use it in GitHub Desktop.
What does ':_*' (colon underscore star) do in Scala
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
// :*_ tells the compiler to pass each element of arr as its own argument to echo, rather than all of it as a single argument. | |
// It is useful when converting list to Map in Scala | |
var mutableMapInstanceOfItemToBoolean = scala.collection.mutable.Map(arrayOfSomeSort.values.toList.map(item => item -> false):_*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment