From 5c7209c2874849a5a7339e23fdbd9aed1bb935b2 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 27 Feb 2018 15:42:52 +0100 Subject: stdlib: Add function lists:search/2 This is essentially PR 102, https://github.com/erlang/otp/pull/102. The OTP Technical Board decided to change the name of the function to search/2. --- lib/stdlib/doc/src/lists.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/stdlib/doc/src') 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 @@
- 19962017 + 19962018 Ericsson AB. All Rights Reserved. @@ -770,6 +770,18 @@ length(lists:seq(From, To, Incr)) =:= (To - From + Incr) div Incr + + + Find the first element that satisfies a predicate. + +

If there is a Value in List + such that Pred(Value) returns + true, returns {value, Value} + for the first such Value, + otherwise returns false.

+
+
+ Split a list into two lists based on a predicate. -- cgit v1.2.3