From 229d0d8ca88bc344bed89e46541b325c1d267996 Mon Sep 17 00:00:00 2001
From: Hans Bolinder
Date: Fri, 6 May 2011 15:58:09 +0200
Subject: r Use Erlang specs and types for documentation
---
lib/stdlib/doc/src/ordsets.xml | 153 +++++++++++++----------------------------
1 file changed, 46 insertions(+), 107 deletions(-)
(limited to 'lib/stdlib/doc/src/ordsets.xml')
diff --git a/lib/stdlib/doc/src/ordsets.xml b/lib/stdlib/doc/src/ordsets.xml
index a20ab2d879..1e26fc2022 100644
--- a/lib/stdlib/doc/src/ordsets.xml
+++ b/lib/stdlib/doc/src/ordsets.xml
@@ -4,7 +4,7 @@
- 19962009
+ 19962011
Ericsson AB. All Rights Reserved.
@@ -45,202 +45,141 @@
different if and only if they do not compare equal (==).
-
- DATA TYPES
-
-ordered_set()
- as returned by new/0
-
+
+
+
+ As returned by new/0.
+
+
- new() -> Ordset
+
Return an empty set
-
- Ordset = ordered_set()
-
Returns a new empty ordered set.
- is_set(Ordset) -> bool()
+
Test for an Ordset
-
- Ordset = term()
-
- Returns true if Ordset is an ordered set of
+
Returns true if Ordset is an ordered set of
elements, otherwise false.
- size(Ordset) -> int()
+
Return the number of elements in a set
-
- Ordset = term()
-
- Returns the number of elements in Ordset.
+ Returns the number of elements in Ordset.
- to_list(Ordset) -> List
+
Convert an Ordsetinto a list
-
- Ordset = ordered_set()
- List = [term()]
-
- Returns the elements of Ordset as a list.
+ Returns the elements of Ordset as a list.
- from_list(List) -> Ordset
+
Convert a list into an Ordset
-
- List = [term()]
- Ordset = ordered_set()
-
- Returns an ordered set of the elements in List.
+ Returns an ordered set of the elements in List.
- is_element(Element, Ordset) -> bool()
+
Test for membership of an Ordset
-
- Element = term()
- Ordset = ordered_set()
-
- Returns true if Element is an element of
- Ordset, otherwise false.
+ Returns true if Element is an element of
+ Ordset, otherwise false.
- add_element(Element, Ordset1) -> Ordset2
+
Add an element to an Ordset
-
- Element = term()
- Ordset1 = Ordset2 = ordered_set()
-
- Returns a new ordered set formed from Ordset1 with
- Element inserted.
+ Returns a new ordered set formed from Ordset1 with
+ Element inserted.
- del_element(Element, Ordset1) -> Ordset2
+
Remove an element from an Ordset
-
- Element = term()
- Ordset1 = Ordset2 = ordered_set()
-
- Returns Ordset1, but with Element removed.
+ Returns Ordset1, but with Element removed.
- union(Ordset1, Ordset2) -> Ordset3
+
Return the union of two Ordsets
-
- Ordset1 = Ordset2 = Ordset3 = ordered_set()
-
- Returns the merged (union) set of Ordset1 and
- Ordset2.
+ Returns the merged (union) set of Ordset1 and
+ Ordset2.
- union(OrdsetList) -> Ordset
+
Return the union of a list of Ordsets
-
- OrdsetList = [ordered_set()]
- Ordset = ordered_set()
-
Returns the merged (union) set of the list of sets.
- intersection(Ordset1, Ordset2) -> Ordset3
+
Return the intersection of two Ordsets
-
- Ordset1 = Ordset2 = Ordset3 = ordered_set()
-
- Returns the intersection of Ordset1 and
- Ordset2.
+ Returns the intersection of Ordset1 and
+ Ordset2.
- intersection(OrdsetList) -> Ordset
+
Return the intersection of a list of Ordsets
-
- OrdsetList = [ordered_set()]
- Ordset = ordered_set()
-
Returns the intersection of the non-empty list of sets.
- is_disjoint(Ordset1, Ordset2) -> bool()
+
Check whether two Ordsets are disjoint
-
- Ordset1 = Ordset2 = ordered_set()
-
- Returns true if Ordset1 and
- Ordset2 are disjoint (have no elements in common),
+
Returns true if Ordset1 and
+ Ordset2 are disjoint (have no elements in common),
and false otherwise.
- subtract(Ordset1, Ordset2) -> Ordset3
+
Return the difference of two Ordsets
-
- Ordset1 = Ordset2 = Ordset3 = ordered_set()
-
- Returns only the elements of Ordset1 which are not
- also elements of Ordset2.
+ Returns only the elements of Ordset1 which are not
+ also elements of Ordset2.
- is_subset(Ordset1, Ordset2) -> bool()
+
Test for subset
-
- Ordset1 = Ordset2 = ordered_set()
-
- Returns true when every element of Ordset1 is
- also a member of Ordset2, otherwise false.
+ Returns true when every element of Ordset1 is
+ also a member of Ordset2, otherwise false.
- fold(Function, Acc0, Ordset) -> Acc1
+
Fold over set elements
-
- Function = fun (E, AccIn) -> AccOut
- Acc0 = Acc1 = AccIn = AccOut = term()
- Ordset = ordered_set()
-
- Fold Function over every element in Ordset
+
Fold Function over every element in Ordset
returning the final value of the accumulator.
- filter(Pred, Ordset1) -> Set2
+
Filter set elements
-
- Pred = fun (E) -> bool()
- Set1 = Set2 = ordered_set()
-
- Filter elements in Set1 with boolean function
- Fun.
+ Filter elements in Ordset1 with boolean function
+ Pred.
--
cgit v1.2.3