From 5a19f97ebb036f7e9f6e2c735d9f52662b20a6a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
+ The call will fail with a
Example:
> Map = #{"hi" => 42},
@@ -95,8 +98,10 @@
Returns the value Value associated with Key if
Map contains Key .
- If no value is associated with Key then the call will
- fail with an exception.
+
+
+ The call will fail with a {badmap,Map} exception if Map is not a map,
+ or with a {badkey,Key} exception if no value is associated with Key .
Example:
@@ -116,6 +121,10 @@
Map contains Key .
If no value is associated with Key then returns Default .
+
+ The call will fail with a {badmap,Map} exception if Map is not a map.
+
+
Example:
> Map = #{ key1 => val1, key2 => val2 }.
@@ -134,7 +143,9 @@ val1
Returns true if map Map contains Key and returns
false if it does not contain the Key .
- The function will fail with an exception if Map is not a Map.
+
+
+ The call will fail with a {badmap,Map} exception if Map is not a map.
Example:
@@ -154,6 +165,9 @@ false
Returns a complete list of keys, in arbitrary order, which resides within Map .
+
+ The call will fail with a {badmap,Map} exception if Map is not a map.
+
Example:
> Map = #{42 => value_three,1337 => "value two","a" => 1},
@@ -189,6 +203,10 @@ false
Merges two maps into a single map Map3 . If two keys exists in both maps the
value in Map1 will be superseded by the value in Map2 .
+
+ The call will fail with a {badmap,Map} exception if Map1 or
+ Map2 is not a map.
+
Example:
> Map1 = #{a => "value_one", b => "value_two"},
@@ -222,6 +240,10 @@ false
replaced by value Value . The function returns a new map Map2 containing the new association and
the old associations in Map1 .
+
+ The call will fail with a {badmap,Map} exception if Map1 is not a map.
+
+
Example:
> Map = #{"a" => 1}.
@@ -241,6 +263,9 @@ false
The function removes the Key , if it exists, and its associated value from
Map1 and returns a new map Map2 without key Key .
+
+ The call will fail with a {badmap,Map} exception if Map1 is not a map.
+
Example:
> Map = #{"a" => 1}.
@@ -276,6 +301,9 @@ false
The fuction returns a list of pairs representing the key-value associations of Map ,
where the pairs, [{K1,V1}, ..., {Kn,Vn}] , are returned in arbitrary order.
+
+ The call will fail with a {badmap,Map} exception if Map is not a map.
+
Example:
> Map = #{42 => value_three,1337 => "value two","a" => 1},
@@ -291,8 +319,11 @@ false
If Key exists in Map1 the old associated value is
replaced by value Value . The function returns a new map Map2 containing
- the new associated value. If Key does not exist in Map1 an exception is
- generated.
+ the new associated value.
+
+
+ The call will fail with a {badmap,Map} exception if Map1 is not a map,
+ or with a {badkey,Key} exception if no value is associated with Key .
Example:
@@ -310,6 +341,9 @@ false
Returns a complete list of values, in arbitrary order, contained in map M .
+
+ The call will fail with a {badmap,Map} exception if Map is not a map.
+
Example:
> Map = #{42 => value_three,1337 => "value two","a" => 1},
--
cgit v1.2.3