aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-03-20 10:42:18 +0100
committerGitHub <[email protected]>2018-03-20 10:42:18 +0100
commit269814984a005f23fd1b5305c99cd92b68fd1641 (patch)
tree466154699c1150650b11e2e1c90e775dd9e1e86a /lib/stdlib/doc/src
parent01460976cfa3222f618ac494f462eccd0ba9a1c8 (diff)
parent5c7209c2874849a5a7339e23fdbd9aed1bb935b2 (diff)
downloadotp-269814984a005f23fd1b5305c99cd92b68fd1641.tar.gz
otp-269814984a005f23fd1b5305c99cd92b68fd1641.tar.bz2
otp-269814984a005f23fd1b5305c99cd92b68fd1641.zip
Merge pull request #1744 from uabboli/hasse/stdlib/lists_search/OTP-14675
stdlib: Add function lists:search/2
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r--lib/stdlib/doc/src/lists.xml14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 7efafedc82..c3d5d7e07a 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2017</year>
+ <year>1996</year><year>2018</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -771,6 +771,18 @@ length(lists:seq(From, To, Incr)) =:= (To - From + Incr) div Incr</code>
</func>
<func>
+ <name name="search" arity="2"/>
+ <fsummary>Find the first element that satisfies a predicate.</fsummary>
+ <desc>
+ <p>If there is a <c><anno>Value</anno></c> in <c><anno>List</anno></c>
+ such that <c><anno>Pred</anno>(<anno>Value</anno>)</c> returns
+ <c>true</c>, returns <c>{value, <anno>Value</anno>}</c>
+ for the first such <c><anno>Value</anno></c>,
+ otherwise returns <c>false</c>.</p>
+ </desc>
+ </func>
+
+ <func>
<name name="splitwith" arity="2"/>
<fsummary>Split a list into two lists based on a predicate.</fsummary>
<desc>