English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang Map values method

Erlang Mapping

This method is used to return all values in the map.

Syntax

values(map)

Parameter

  • map1 −This is the map that needs to return all values.

Return Value

Return a list of values from a map.

-module(helloworld). 
-export([start/0]). 
start() ->   
   Lst1 maps:from_list([{"a",1},{"b",2},{"c",3}], 
   Map1 maps:from_list(Lst1)), 
   io:fwrite("~p~n",[maps:values(Map1)]).

Output Result

The output of the above program is as follows-

[1,2,3]

Erlang Mapping