aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/sofs.xml
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-02-05 08:33:57 +0000
committerErlang/OTP <[email protected]>2010-02-05 08:33:57 +0000
commite5d4b0bddc75eda1ad3445d7164171c0a6e8bbf6 (patch)
tree86c77b2a0522002c3292d737839080e8347d47dc /lib/stdlib/doc/src/sofs.xml
parentf2846970e7fcb3df4c51b6450fe72c145d5e5b2f (diff)
downloadotp-e5d4b0bddc75eda1ad3445d7164171c0a6e8bbf6.tar.gz
otp-e5d4b0bddc75eda1ad3445d7164171c0a6e8bbf6.tar.bz2
otp-e5d4b0bddc75eda1ad3445d7164171c0a6e8bbf6.zip
OTP-8404: Doc: some corrections and improvements in STDLIB
Diffstat (limited to 'lib/stdlib/doc/src/sofs.xml')
-rw-r--r--lib/stdlib/doc/src/sofs.xml17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/stdlib/doc/src/sofs.xml b/lib/stdlib/doc/src/sofs.xml
index ac434ec5b7..8c8ae51262 100644
--- a/lib/stdlib/doc/src/sofs.xml
+++ b/lib/stdlib/doc/src/sofs.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>sofs</title>
@@ -311,7 +311,7 @@
applying Fun to the type of the given set), and that Fun does
nothing but selecting, duplicating or rearranging parts of the
elements. Specifying a SetFun as an integer I is equivalent to
- specifying <c>{external, fun(X)&nbsp;-> element(I,&nbsp;X)}</c>,
+ specifying <c>{external, fun(X)&nbsp;-> element(I,&nbsp;X)&nbsp;end}</c>,
but is to be preferred since it makes it possible to handle this
case even more efficiently. Examples of SetFuns:</p>
<pre>
@@ -336,6 +336,7 @@ fun(S) -> sofs:partition(1, S) end
<c>badarg</c>, <c>bad_function</c>, or <c>type_mismatch</c>
message when given badly formed arguments or sets the types of
which are not compatible.</p>
+ <p>When comparing external sets the operator <c>==/2</c> is used.</p>
<p><em>Types</em></p>
<pre>
anyset() = -&nbsp;an unordered, ordered or atomic set&nbsp;-
@@ -1108,7 +1109,13 @@ type() = -&nbsp;a type&nbsp;- </pre>
<desc>
<p>Returns <c>true</c> if the AnySet1 and AnySet2
are <seealso marker="#equal">equal</seealso>, <c>false</c>
- otherwise.</p>
+ otherwise. This example shows that <c>==/2</c> is used when
+ comparing sets for equality:</p>
+ <pre>
+1> <input>S1 = sofs:set([1.0]),</input>
+<input>S2 = sofs:set([1]),</input>
+<input>sofs:is_equal(S1, S2).</input>
+true</pre>
</desc>
</func>
<func>