Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darionyaphet/47184aefbc932c056cbece80285e3e8e to your computer and use it in GitHub Desktop.
Save darionyaphet/47184aefbc932c056cbece80285e3e8e to your computer and use it in GitHub Desktop.
val m = Map("k0"->"v0","k1"->"v1","k2"->"v2")
val n = m.map{case (k,v) => (v,k)}.toMap
println(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment