aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-05-26 16:39:15 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-05-26 16:39:15 +0200
commit3ac10682f7558e39eda8f850387eff67b4354b00 (patch)
treec8798039468171db114bd4d7c35059aa8c4aed47 /lib/stdlib/doc
parent444bdf0310288cb3ccbd6af28927a5504618ec3f (diff)
parent6b6cd01b607a1bfcf61bb6d5f4cc3fe9b37445db (diff)
downloadotp-3ac10682f7558e39eda8f850387eff67b4354b00.tar.gz
otp-3ac10682f7558e39eda8f850387eff67b4354b00.tar.bz2
otp-3ac10682f7558e39eda8f850387eff67b4354b00.zip
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r--lib/stdlib/doc/src/maps.xml20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/maps.xml b/lib/stdlib/doc/src/maps.xml
index 76137e3dee..b37f7fd7fd 100644
--- a/lib/stdlib/doc/src/maps.xml
+++ b/lib/stdlib/doc/src/maps.xml
@@ -108,6 +108,26 @@
</func>
<func>
+ <name name="get" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns the value <c><anno>Value</anno></c> associated with <c><anno>Key</anno></c> if
+ <c><anno>Map</anno></c> contains <c><anno>Key</anno></c>.
+ If no value is associated with <c><anno>Key</anno></c> then returns <c><anno>Default</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{ key1 => val1, key2 => val2 }.
+#{key1 => val1,key2 => val2}
+> maps:get(key1, Map, "Default value").
+val1
+> maps:get(key3, Map, "Default value").
+"Default value"</code>
+ </desc>
+ </func>
+
+ <func>
<name name="is_key" arity="2"/>
<fsummary></fsummary>
<desc>