From 6e6b66218b8ce1f68ca9fd68690ee93d6c98bb05 Mon Sep 17 00:00:00 2001 From: Sergey Abramyan Date: Tue, 15 Apr 2014 11:45:37 +0400 Subject: Add docs and test for maps:get/3 --- lib/stdlib/doc/src/maps.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/stdlib/doc/src/maps.xml') diff --git a/lib/stdlib/doc/src/maps.xml b/lib/stdlib/doc/src/maps.xml index 76137e3dee..a6bb120d07 100644 --- a/lib/stdlib/doc/src/maps.xml +++ b/lib/stdlib/doc/src/maps.xml @@ -107,6 +107,26 @@ + + + + +

+ Returns the value Value associated with Key if + Map contains Key. + If no value is associated with Key then returns Default. +

+

Example:

+ +>Map = #{ key1 => val1, key2 => val2 }. + #{key1 => val1,key2 => val2} + maps:get(key1, Map, "Default value"). + val1 + maps:get(key3, Map, "Default value"). + "Default value" +
+
+ -- cgit v1.2.3