Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1> L = [{a, 1}. {b,2}, {c, 3}, {d, 4}].
- proplists:get_value(a, L).
- proplists:get_value(b, L).
- ...
- proplists:get_valus(d, L).
- [{a, 1}. {b,2}, {c, 3}, {d, 4}] = L.
- [{a, A}, {b, B}, {c, C}, {d, D}] = L,
- [A, B, C, D] = [ proplists:get_value(X, L) || X <- [a,b,c,d] ],
- A = proplists:get_value(a, L),
- B = proplists:get_value(b, L),
- C = proplists:get_value(c, L),
- D = proplists:get_value(d, L),
- [A, B, C, D] = [ V || Key <- [a,b,c,d], {K, V} <- L, K =:= Key ],
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement