aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-11-28 16:15:26 +0100
committerBjörn-Egil Dahlberg <[email protected]>2012-12-14 16:09:17 +0100
commit571803ae686c226ad1db4c54c7a6d2b579b9ba9c (patch)
tree46342bf65e7210eaf0b21b3925e0c3af39e9db22 /erts/doc
parenta190a366c5e6f9ff7abab12e51167d07d51ee417 (diff)
downloadotp-571803ae686c226ad1db4c54c7a6d2b579b9ba9c.tar.gz
otp-571803ae686c226ad1db4c54c7a6d2b579b9ba9c.tar.bz2
otp-571803ae686c226ad1db4c54c7a6d2b579b9ba9c.zip
erts: Document insert_element and delete_element
Document new BIFs: * erlang:insert_element/3 * erlang:delete_element/2
Diffstat (limited to 'erts/doc')
-rw-r--r--erts/doc/src/erlang.xml34
1 files changed, 34 insertions, 0 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 1a97a84b42..2faa46d760 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -626,6 +626,22 @@ false</pre>
{more,6}</pre>
</desc>
</func>
+
+ <func>
+ <name name="delete_element" arity="2"/>
+ <fsummary>Delete element at index in a tuple</fsummary>
+ <type_desc variable="Index">1..tuple_size(<anno>Tuple1</anno>)</type_desc>
+ <desc>
+ <p>
+ Returns a new tuple with element at <c><anno>Index</anno></c> removed from
+ tuple <c><anno>Tuple1</anno></c>.
+ </p>
+ <pre>
+> <input>erlang:delete_element(2, {one, two, three}).</input>
+{one,three}</pre>
+ </desc>
+ </func>
+
<func>
<name name="delete_module" arity="1"/>
<fsummary>Make the current code for a module old</fsummary>
@@ -1361,6 +1377,24 @@ os_prompt% </pre>
when the process wakes up.</p>
</desc>
</func>
+
+ <func>
+ <name name="insert_element" arity="3"/>
+ <fsummary>Insert an element at index in a tuple</fsummary>
+ <type_desc variable="Index">1..tuple_size(<anno>Tuple1</anno>) + 1</type_desc>
+ <desc>
+ <p>
+ Returns a new tuple with element <c><anno>Term</anno></c> insert at position
+ <c><anno>Index</anno></c> in tuple <c><anno>Tuple1</anno></c>.
+ All elements from position <c><anno>Index</anno></c> and upwards are subsequently
+ pushed one step higher in the new tuple <c><anno>Tuple2</anno></c>.
+ </p>
+ <pre>
+> <input>erlang:insert_element(2, {one, two, three}, new).</input>
+{one,new,two,three}</pre>
+ </desc>
+ </func>
+
<func>
<name name="integer_to_list" arity="1"/>
<fsummary>Text representation of an integer</fsummary>