aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-02-07 11:42:50 +0100
committerHenrik Nord <[email protected]>2014-02-07 11:42:50 +0100
commit069b1840316979c69e4bfed1c814a239b852d8ba (patch)
treeeaea7e45e5ab265f1f85d7ff63f69e2c482f0009 /lib/stdlib/doc
parent76181f2e146dea3638e70a8636690ab8b4397c70 (diff)
parent875b58c8119858676af0139b0f6b69537cae5706 (diff)
downloadotp-069b1840316979c69e4bfed1c814a239b852d8ba.tar.gz
otp-069b1840316979c69e4bfed1c814a239b852d8ba.tar.bz2
otp-069b1840316979c69e4bfed1c814a239b852d8ba.zip
Merge branch 'hsv/add_droplast_to_lists'
* hsv/add_droplast_to_lists: Added documentation of lists:droplast/1 Added tests for lists:droplast/1 to stdlib/lists_SUITE stdlib/lists: Add function droplast/1 This functions drops the last element of a non-empty list.
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r--lib/stdlib/doc/src/lists.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 251a383cf8..ee3c51c62c 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -123,6 +123,14 @@
</desc>
</func>
<func>
+ <name name="droplast" arity="1"/>
+ <fsummary>Drop the last element of a list</fsummary>
+ <desc>
+ <p>Drops the last element of a <c><anno>List</anno></c>. The list should
+ be non-empty, otherwise the function will crash with a <c>function_clause</c></p>
+ </desc>
+ </func>
+ <func>
<name name="dropwhile" arity="2"/>
<fsummary>Drop elements from a list while a predicate is true</fsummary>
<desc>