Skip to content

Instantly share code, notes, and snippets.

@Allan-Gong
Last active November 30, 2015 23:56
Show Gist options
  • Save Allan-Gong/8ec59672b318bc97942b to your computer and use it in GitHub Desktop.
Save Allan-Gong/8ec59672b318bc97942b to your computer and use it in GitHub Desktop.
What does ':_*' (colon underscore star) do in Scala
// :*_ 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