From 571803ae686c226ad1db4c54c7a6d2b579b9ba9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Wed, 28 Nov 2012 16:15:26 +0100 Subject: erts: Document insert_element and delete_element Document new BIFs: * erlang:insert_element/3 * erlang:delete_element/2 --- erts/doc/src/erlang.xml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'erts/doc') 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 {more,6} + + + + Delete element at index in a tuple + 1..tuple_size(Tuple1) + +

+ Returns a new tuple with element at Index removed from + tuple Tuple1. +

+
+> erlang:delete_element(2, {one, two, three}).
+{one,three}
+
+
+ Make the current code for a module old @@ -1361,6 +1377,24 @@ os_prompt% when the process wakes up.

+ + + + Insert an element at index in a tuple + 1..tuple_size(Tuple1) + 1 + +

+ Returns a new tuple with element Term insert at position + Index in tuple Tuple1. + All elements from position Index and upwards are subsequently + pushed one step higher in the new tuple Tuple2. +

+
+> erlang:insert_element(2, {one, two, three}, new).
+{one,new,two,three}
+
+
+ Text representation of an integer -- cgit v1.2.3