Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -0,0 +1 @@
|
|||
Dictionary = dict:from_list( lists:zip([key1, key2, key3], [value1, 2, 3]) ).
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
val keys = Array(1, 2, 3)
|
||||
val values = Array("A", "B", "C")
|
||||
val map = keys.zip(values).toMap
|
||||
val keys = List(1, 2, 3)
|
||||
val values = Array("A", "B", "C") // Array mixed with List
|
||||
val map = keys.zip(values).toMap // and other Seq are possible.
|
||||
|
||||
// Testing
|
||||
assert(map == Map(1 ->"A", 2 -> "B", 3 -> "C"))
|
||||
println("Successfully completed without errors.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue