Join Slack
Communities
Powered by
Can we modify += syntax to support modifying neste...
# language-proposals
j
jkbbwr
06/24/2016, 4:07 PM
Can we modify += syntax to support modifying nested immutable containers e.g.
Copy code
var a = mapOf(1 to listOf(1, 2, 3), 2 to listOf(4, 5, 6))
I want to propose that
a[1] += 4
does the same as
a += 1 to a[1]!! + 4
Open in Slack
Previous
Next