Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/smlnj-lib/Doc/mldoc/atom.mldoc
ViewVC logotype

Annotation of /sml/trunk/src/smlnj-lib/Doc/mldoc/atom.mldoc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 168 - (view) (download)

1 : monnier 167 <!-- atom.mldoc -->
2 :    
3 :     <!DOCTYPE ML-DOC SYSTEM>
4 :    
5 :     <COPYRIGHT OWNER="AT&AMP;T Bell Laboratories" YEAR=1996>
6 :     <VERSION VERID="1.0" YEAR=1996 MONTH=5 DAY=29>
7 :     <TITLE>The ATOM signature</TITLE>
8 :    
9 :     <SECT>
10 :     <HEAD>The <CD/ATOM/ signature</HEAD>
11 :    
12 :     <PP>
13 :     The <STRREF TOPID NOLINK/Atom/ structure provides hashed strings with
14 :     fast equality testing.
15 :    
16 :     <STRUCTURE STRID="Atom">
17 :     <SIGBODY SIGID="ATOM" FILE=ATOM-SIG>
18 :     <SPEC>
19 :     <TYPE><ID>atom
20 :     <COMMENT>
21 :     Atoms are hashed strings that support fast equality testing.
22 :     <SPEC>
23 :     <VAL>atom<TY>string -> atom
24 :     <COMMENT>
25 :     <PROTOTY>
26 :     atom <ARG/s/
27 :     </PROTOTY>
28 :     creates an atom out of the string <ARG/s/.
29 :     Two calls to <VALREF NOLINK/atom/ with the same argument will
30 :     return the same atom.
31 :     <SPEC>
32 :     <VAL>toString<TY>atom -> string
33 :     <COMMENT>
34 :     <PROTOTY>
35 :     toString <ARG/at/
36 :     </PROTOTY>
37 :     returns the string that the atom <ARG/at/ was created from.
38 :     <SPEC>
39 :     <VAL>sameAtom<TY>(atom * atom) -> bool
40 :     <COMMENT>
41 :     <PROTOTY>
42 :     sameAtom (<ARG/at1/, <ARG/at2/)
43 :     </PROTOTY>
44 :     returns <CD/true/, if the two atoms are the same.
45 :     This is a constant-time equality test.
46 :     <SPEC>
47 :     <VAL>compare<TY>(atom * atom) -> order
48 :     <COMMENT>
49 :     <PROTOTY>
50 :     compare (<ARG/at/, <ARG/at2/)
51 :     </PROTOTY>
52 :     returns the relative order of the two atoms according to some
53 :     internal ordering.
54 :     Note that this is <EM/not/ the lexical ordering of the string
55 :     representations of the atoms.
56 :     <SPEC>
57 :     <VAL>hash<TY>atom -> word
58 :     <COMMENT>
59 :     <PROTOTY>
60 :     hash <ARG/at/
61 :     </PROTOTY>
62 :     returns a hash value for the atom <ARG/at/.
63 :     </SIGBODY>
64 :     <SEEALSO>
65 :     <STRREF TOPID/AtomMap/
66 :     <STRREF TOPID/AtomSet/
67 :     <STRREF TOPID/AtomTable/
68 :     </SEEALSO>
69 :     </STRUCTURE>

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0