Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -1,13 +1,7 @@
|
|||
val m=Map("Hello"->13, "world"->31, "!"->71)
|
||||
val m = Map("Amsterdam" -> "Netherlands", "New York" -> "USA", "Heemstede" -> "Netherlands")
|
||||
|
||||
println("Keys:")
|
||||
m.keys foreach println
|
||||
|
||||
println("\nValues:")
|
||||
m.values foreach println
|
||||
|
||||
println("\nPairs:")
|
||||
m foreach println
|
||||
|
||||
println("\nKey->Value:")
|
||||
for((k,v)<-m) println(k+"->"+v)
|
||||
println(f"Key->Value: ${m.mkString(", ")}%s")
|
||||
println(f"Pairs: ${m.toList.mkString(", ")}%s")
|
||||
println(f"Keys: ${m.keys.mkString(", ")}%s")
|
||||
println(f"Values: ${m.values.mkString(", ")}%s")
|
||||
println(f"Unique values: ${m.values.toSet.mkString(", ")}%s")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue