diff options
Diffstat (limited to 'lib/stdlib/doc/src/sofs.xml')
-rw-r--r-- | lib/stdlib/doc/src/sofs.xml | 17 |
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) -> element(I, X)}</c>, + specifying <c>{external, fun(X) -> element(I, X) 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() = - an unordered, ordered or atomic set - @@ -1108,7 +1109,13 @@ type() = - a type - </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> |