English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to generate a map from a list.
from_list(Lst)
Lst −This is the list that needs to be converted to a map.
Mapping based on the provided list.
-module(helloworld). -export([start/0]). start(), -> Lst1 = [{"a",1},{"b",2},{"c",3}], io:fwrite("~p~n",[maps:from_list(Lst1).
Output Result
The output of the above program is as follows.
#{"a" => 1,"b" => 2,"c" => 3}