aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erlang.xml
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-05-07 10:30:22 +0200
committerGitHub <[email protected]>2018-05-07 10:30:22 +0200
commit7a19de1bf0eb863e0d0febf7e7e5e555c8628575 (patch)
tree84331df750b98d76b59472ecf2de657121798931 /erts/doc/src/erlang.xml
parent49dc5d3975357971ffc3020d095a8187d80e3b69 (diff)
parent5d0874a8f9fd617308d9024783db1e4e24268184 (diff)
downloadotp-7a19de1bf0eb863e0d0febf7e7e5e555c8628575.tar.gz
otp-7a19de1bf0eb863e0d0febf7e7e5e555c8628575.tar.bz2
otp-7a19de1bf0eb863e0d0febf7e7e5e555c8628575.zip
Merge pull request #1802 from michalmuskala/map-is-key-bif
Introduce is_map_key/2 guard BIF OTP-15037
Diffstat (limited to 'erts/doc/src/erlang.xml')
-rw-r--r--erts/doc/src/erlang.xml20
1 files changed, 20 insertions, 0 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index f561413fab..3154fdaf8c 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -2432,6 +2432,26 @@ os_prompt%</pre>
</func>
<func>
+ <name name="is_map_key" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>Returns <c>true</c> if map <c><anno>Map</anno></c> contains
+ <c><anno>Key</anno></c> and returns <c>false</c> if it does not
+ contain the <c><anno>Key</anno></c>.</p>
+ <p>The call fails with a <c>{badmap,Map}</c> exception if
+ <c><anno>Map</anno></c> is not a map.</p>
+ <p><em>Example:</em></p>
+ <code type="none">
+> Map = #{"42" => value}.
+#{"42" => value}
+> is_map_key("42",Map).
+true
+> is_map_key(value,Map).
+false</code>
+ </desc>
+ </func>
+
+ <func>
<name name="is_number" arity="1"/>
<fsummary>Check whether a term is a number.</fsummary>
<desc>