Merge values in map kotlin : <p>I need merge maps <code>mapA</code> and<code>mapB</code> with pairs of "name" - "phone number" into the final map, sticking together the values for duplicate keys, separated by commas. Duplicate values should be added only once.
I need the most idiomatic and correct in terms of language approach.</p>

<p>For example:</p>

<pre><code>val mapA = mapOf("Emergency" to "112", "Fire department" to "101", "Police" to "102")
val mapB = mapOf("Emergency" to "911", "Police" to "102")
</code></pre>

<p>The final result should look like this:</p>

<pre><code>{"Emergency" to "112, 911", "Fire department" to "101", "Police" to "102"}
</code></pre>

<p>This is my function:</p>

<pre><code>fun mergePhoneBooks(mapA: Map&lt;String, String&gt;, mapB: Map&lt;String, String&gt;): Map&lt;String, String&gt; {
    val unionList: MutableMap &lt;String, String&gt; = mapA.toMutableMap()
    unionList.forEach { (key, value) -&gt; TODO() } // here's I can't come on with a beatiful solution

    return unionList
}
</code></pre>
