此方法用于合并2个映射。
merge(map1,map2)
map1 −这是第一张需要合并的映射。
map2 −这是第二张映射,需要与第一张映射合并。
一个映射,它是map1和map2的合并。
-module(helloworld). 
-export([start/0]). 
start() ->
   Lst1 = [{"a",1},{"b",2},{"c",3}], 
   Lst2 = [{"d",4},{"e",5},{"f",6}], 
   
   Map1 = maps:from_list(Lst1), 
   Map2 = maps:from_list(Lst2), 
   io:fwrite("~p~n",[maps:merge(Map1,Map2)]).输出结果
上面程序的输出如下。
#{"a" => 1,"b" => 2,"c" => 3,"d" => 4,"e" => 5,"f" => 6}