
5 Mar
2019
5 Mar
'19
7:50 p.m.
Does anyone have an example of another programming language that allows for addition of dictionaries/mappings?
kotlin does that (`to` means `:`) :
fun main() { var a = mutableMapOf<String,Int>("a" to 1, "b" to 2) var b = mutableMapOf<String,Int>("c" to 1, "b" to 3) println(a) println(b) println(a + b) println(b + a) } {a=1, b=2} {c=1, b=3} {a=1, b=3, c=1} {c=1, b=2, a=1}