aboutsummaryrefslogblamecommitdiffstats
path: root/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl
blob: 87aea3d8e13c7d77fdb173d9044264764d0413bb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                       
-module(maps_update_literals).
-export([test/0]).

test() ->
    Map = #{x=>1,y=>2,z=>3,q=>4},
    #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
		{"a","1"},{"b","2"},{"c","3"},{"d","4"}
	]),
    ok.

loop_update_literals_x_q(Map, []) -> Map;
loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
    loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).