From 6a37976806f9a0998d0970c17f0e176b6e19bdad Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 6 Oct 2011 15:08:09 +0200 Subject: Correct the docs --- erts/doc/src/erl.xml | 2 +- lib/stdlib/doc/src/lists.xml | 26 +++++++++++++------------- lib/stdlib/src/lists.erl | 29 +++++++++++++++++------------ 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 8502ceadd2..39c79a29df 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -994,7 +994,7 @@ the section, i.e. the end of the command line following after an flag.

- and + and

The content of these environment variables will be added to the end of the command line for .

diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml index 6f3ed7af98..7042c84437 100644 --- a/lib/stdlib/doc/src/lists.xml +++ b/lib/stdlib/doc/src/lists.xml @@ -240,7 +240,7 @@ flatmap(Fun, List1) -> Delete an element from a list of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns a copy of TupleList1 where the first occurrence of a tuple whose Nth element compares equal to @@ -266,7 +266,7 @@ flatmap(Fun, List1) -> Map a function over a list of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns a list of tuples where, for each tuple in TupleList1, the Nth element Term1 of the tuple @@ -298,7 +298,7 @@ flatmap(Fun, List1) -> Merge two key-sorted lists of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns the sorted list formed by merging TupleList1 and TupleList2. The merge is performed on @@ -312,7 +312,7 @@ flatmap(Fun, List1) -> Replace an element in a list of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns a copy of TupleList1 where the first occurrence of a T tuple whose Nth element @@ -342,7 +342,7 @@ flatmap(Fun, List1) -> Sort a list of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns a list containing the sorted elements of the list TupleList1. Sorting is performed on the Nth @@ -352,7 +352,7 @@ flatmap(Fun, List1) -> Store an element in a list of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns a copy of TupleList1 where the first occurrence of a tuple T whose Nth element @@ -366,7 +366,7 @@ flatmap(Fun, List1) -> Extract an element from a list of tuples - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Searches the list of tuples TupleList1 for a tuple whose Nth element compares equal to Key. @@ -500,7 +500,7 @@ flatmap(Fun, List1) -> Return the Nth element of a list - 1..length(List) + 1..length(List)

Returns the Nth element of List. For example:

@@ -511,7 +511,7 @@ c
Return the Nth tail of a list - 0..length(List) + 0..length(List)

Returns the Nth tail of List, that is, the sublist of List starting at N+1 and continuing up to @@ -630,7 +630,7 @@ length(lists:seq(From, To, Incr)) == (To-From+Incr) div Incr Split a list into two lists - 0..length(List1) + 0..length(List1)

Splits List1 into List2 and List3. List2 contains the first N elements and @@ -670,7 +670,7 @@ splitwith(Pred, List) -> Return a sub-list starting at a given position and with a given number of elements - 1..(length(List1)+1) + 1..(length(List1)+1)

Returns the sub-list of List1 starting at Start and with (max) Len elements. It is not an error for @@ -732,7 +732,7 @@ splitwith(Pred, List) -> Merge two key-sorted lists of tuples, removing duplicates - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns the sorted list formed by merging TupleList1 and TupleList2. The merge is performed on the @@ -746,7 +746,7 @@ splitwith(Pred, List) -> Sort a list of tuples, removing duplicates - 1..tuple_size(Tuple) + 1..tuple_size(Tuple)

Returns a list containing the sorted elements of the list TupleList1 where all but the first tuple of the diff --git a/lib/stdlib/src/lists.erl b/lib/stdlib/src/lists.erl index bba46e4cb6..e73c087753 100644 --- a/lib/stdlib/src/lists.erl +++ b/lib/stdlib/src/lists.erl @@ -628,9 +628,10 @@ keydelete3(_, _, []) -> []. -spec keyreplace(Key, N, TupleList1, NewTuple) -> TupleList2 when Key :: term(), N :: pos_integer(), - TupleList1 :: [tuple()], - TupleList2 :: [tuple()], - NewTuple :: tuple(). + TupleList1 :: [Tuple], + TupleList2 :: [Tuple], + NewTuple :: Tuple, + Tuple :: tuple(). keyreplace(K, N, L, New) when is_integer(N), N > 0, is_tuple(New) -> keyreplace3(K, N, L, New). @@ -660,9 +661,10 @@ keytake(_K, _N, [], _L) -> false. -spec keystore(Key, N, TupleList1, NewTuple) -> TupleList2 when Key :: term(), N :: pos_integer(), - TupleList1 :: [tuple()], - TupleList2 :: [tuple(), ...], - NewTuple :: tuple(). + TupleList1 :: [Tuple], + TupleList2 :: [Tuple, ...], + NewTuple :: Tuple, + Tuple :: tuple(). keystore(K, N, L, New) when is_integer(N), N > 0, is_tuple(New) -> keystore2(K, N, L, New). @@ -740,8 +742,9 @@ keysort_1(_I, X, _EX, [], R) -> TupleList1 :: [T1], TupleList2 :: [T2], TupleList3 :: [(T1 | T2)], - T1 :: tuple(), - T2 :: tuple(). + T1 :: Tuple, + T2 :: Tuple, + Tuple :: tuple(). keymerge(Index, T1, L2) when is_integer(Index), Index > 0 -> case L2 of @@ -842,8 +845,9 @@ ukeysort_1(_I, X, _EX, []) -> TupleList1 :: [T1], TupleList2 :: [T2], TupleList3 :: [(T1 | T2)], - T1 :: tuple(), - T2 :: tuple(). + T1 :: Tuple, + T2 :: Tuple, + Tuple :: tuple(). ukeymerge(Index, L1, T2) when is_integer(Index), Index > 0 -> case L1 of @@ -873,8 +877,9 @@ rukeymerge(Index, T1, L2) when is_integer(Index), Index > 0 -> -spec keymap(Fun, N, TupleList1) -> TupleList2 when Fun :: fun((Term1 :: term()) -> Term2 :: term()), N :: pos_integer(), - TupleList1 :: [tuple()], - TupleList2 :: [tuple()]. + TupleList1 :: [Tuple], + TupleList2 :: [Tuple], + Tuple :: tuple(). keymap(Fun, Index, [Tup|Tail]) -> [setelement(Index, Tup, Fun(element(Index, Tup)))|keymap(Fun, Index, Tail)]; -- cgit v1.2.3