aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-03-16 23:32:44 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-03-16 23:32:44 +0100
commit50cbd99857a674f2b082f5c436b7e721d33f4cd0 (patch)
tree63e40d5e0219497a26889f1b431b98919e7cf72c /erts
parente6ff6cce0dba69ed495f098921d8ed6115007816 (diff)
downloadotp-50cbd99857a674f2b082f5c436b7e721d33f4cd0.tar.gz
otp-50cbd99857a674f2b082f5c436b7e721d33f4cd0.tar.bz2
otp-50cbd99857a674f2b082f5c436b7e721d33f4cd0.zip
erts: Document map guard functions
* erlang:is_map/1 * erlang:map_size/1
Diffstat (limited to 'erts')
-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 aeded7c719..e34646eaf0 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -1784,6 +1784,15 @@ os_prompt% </pre>
</desc>
</func>
<func>
+ <name name="is_map" arity="1"/>
+ <fsummary>Check whether a term is a map</fsummary>
+ <desc>
+ <p>Returns <c>true</c> if <c><anno>Term</anno></c> is a map;
+ otherwise returns <c>false</c>.</p>
+ <p>Allowed in guard tests.</p>
+ </desc>
+ </func>
+ <func>
<name name="is_number" arity="1"/>
<fsummary>Check whether a term is a number</fsummary>
<desc>
@@ -2220,6 +2229,17 @@ os_prompt% </pre>
</desc>
</func>
<func>
+ <name name="map_size" arity="1"/>
+ <fsummary>Return the size of a map</fsummary>
+ <desc>
+ <p>Returns an integer which is the number of key-value pairs in <c><anno>Map</anno></c>.</p>
+ <pre>
+> <input>map_size(#{a=>1, b=>2, c=>3}).</input>
+3</pre>
+ <p>Allowed in guard tests.</p>
+ </desc>
+ </func>
+ <func>
<name name="max" arity="2"/>
<fsummary>Return the largest of two term</fsummary>
<desc>