aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/ets.xml
diff options
context:
space:
mode:
authorGuilherme Andrade <[email protected]>2016-06-03 00:39:01 +0100
committerGuilherme Andrade <[email protected]>2017-03-22 23:04:35 +0000
commit5b7e50500f6cb3e680b277f871392ac706c5c1d7 (patch)
treeafe3cfb1d0695c1e48465269fbece8e16cb4a684 /lib/stdlib/doc/src/ets.xml
parentc5e09d9315044bb9ac27702f6a9d3c6f290a3b8e (diff)
downloadotp-5b7e50500f6cb3e680b277f871392ac706c5c1d7.tar.gz
otp-5b7e50500f6cb3e680b277f871392ac706c5c1d7.tar.bz2
otp-5b7e50500f6cb3e680b277f871392ac706c5c1d7.zip
ETS: Allow for matchspec-based replacement
Diffstat (limited to 'lib/stdlib/doc/src/ets.xml')
-rw-r--r--lib/stdlib/doc/src/ets.xml21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index 05401a2d40..36c803b40c 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -1491,6 +1491,27 @@ is_integer(X), is_integer(Y), X + Y < 4711]]></code>
</func>
<func>
+ <name name="select_replace" arity="2"/>
+ <fsummary>Match the objects in an ETS table against a match_spec and
+ replaces matching objects with the match_spec result</fsummary>
+ <desc>
+ <p>Matches the objects in the table <c><anno>Tab</anno></c> using a
+ <seealso marker="#match_spec">match_spec</seealso>. If the
+ an object is matched, and the match_spec result is an object with the
+ same key, the existing object is replaced with the match_spec result.
+ For any other result from the match_spec the object is kept
+ unchanged.</p>
+ <p>The function returns the number of objects actually
+ replaced in the table.</p>
+ <note>
+ <p>The <c>match_spec</c> has to return an object with the same key if
+ the object is to be replaced. No other return value will get the
+ object replaced.</p>
+ </note>
+ </desc>
+ </func>
+
+ <func>
<name name="select_reverse" arity="1"/>
<fsummary>Continue matching objects in an ETS table.</fsummary>
<desc>