aboutsummaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-12-12 16:54:42 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-12-12 17:11:54 +0100
commit4fbe5a6ea946de03693ffa1be671cf9af93e55eb (patch)
treee0f16954468d378d181a2463e099b291c61c65b2 /system
parent74f4aa2897e7b2a3bac688d808b9b396fc35d1aa (diff)
downloadotp-4fbe5a6ea946de03693ffa1be671cf9af93e55eb.tar.gz
otp-4fbe5a6ea946de03693ffa1be671cf9af93e55eb.tar.bz2
otp-4fbe5a6ea946de03693ffa1be671cf9af93e55eb.zip
doc: Enchance map pair optional/mandatory notes
Diffstat (limited to 'system')
-rw-r--r--system/doc/reference_manual/typespec.xml10
1 files changed, 7 insertions, 3 deletions
diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index c117b6e1d0..a0ea41cb3b 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -142,8 +142,8 @@
PairList :: Pair
| Pair, PairList
- Pair :: Type := Type %% denotes a pair that must be present
- | Type => Type
+ Pair :: Type := Type %% denotes a mandatory pair
+ | Type => Type %% denotes an optional pair
TList :: Type
| Type, TList
@@ -176,7 +176,11 @@
The general form of maps is <c>#{PairList}</c>. The key types in
<c>PairList</c> are allowed to overlap, and if they do, the
leftmost pair takes precedence. A map pair has a key in
- <c>PairList</c> if it belongs to this type.
+ <c>PairList</c> if it belongs to this type. A <c>PairList</c> may contain
+ both 'mandatory' and 'optional' pairs where 'mandatory' denotes that
+ a key type, and its associated value type, must be present.
+ In the case of an 'optional' pair it is not required for the key type to
+ be present.
</p>
<p>
Notice that the syntactic representation of <c>map()</c> is