Logo

Programming-Idioms

History of Idiom 13 > diff from v28 to v29

Edit summary for version 29 by :
New Erlang implementation by user [elbrujohalcon]

Version 28

2015-11-30, 12:37:26

Version 29

2015-12-18, 02:58:52

Idiom #13 Iterate over map keys and values

Print each key k with its value x from an associative array mymap

Idiom #13 Iterate over map keys and values

Print each key k with its value x from an associative array mymap

Code
maps:fold(
	fun(K, V, ok) ->
		io:format("~p: ~p~n", [K, V])
	end, ok, MyMap).
Doc URL
http://erldocs.com/current/stdlib/maps.html?i=0&search=maps:fold#fold/3
Demo URL
http://tryerl.seriyps.ru/#id=18f3