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 /MLRISC/releases/release-110.84/library/intmap.sig
ViewVC logotype

Annotation of /MLRISC/releases/release-110.84/library/intmap.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download) (as text)
Original Path: sml/trunk/src/MLRISC/library/intmap.sig

1 : monnier 496 (* Copyright 1989 by AT&T Bell Laboratories *)
2 :     signature INTMAP =
3 :     sig
4 :     type 'a intmap
5 :    
6 :     (* return a named intmap *)
7 :     val namednew : string * int * exn -> 'a intmap
8 :    
9 :     (* return an unnamed intmap *)
10 :     val new : int * exn -> 'a intmap
11 :    
12 :     (* return the number of elements *)
13 :     val elems : 'a intmap -> int
14 :    
15 :     (* insert a new binding *)
16 :     val add : 'a intmap -> int * 'a -> unit
17 :    
18 :     (* remove a key; no effect if the key does not exists *)
19 :     val rmv : 'a intmap -> int -> unit
20 :    
21 :     (* lookup a key; raises exception if the key does not exists *)
22 :     val map : 'a intmap -> int -> 'a
23 :    
24 :     (* lookup a key; return the key if no associated binding exists *)
25 :     val mapInt : int intmap -> int -> int
26 :    
27 :     (* lookup a key; return the default value if the key is missing *)
28 :     val mapWithDefault : 'a intmap * 'a -> int -> 'a
29 :    
30 :     (* iterate over an intmap *)
31 :     val app : (int * 'a -> unit) -> 'a intmap -> unit
32 :    
33 :     (* convert an intmap to a list *)
34 :     val intMapToList: 'a intmap -> (int * 'a) list
35 :    
36 :     (* return the keys in an intmap *)
37 :     val keys: 'a intmap -> int list
38 :    
39 :     (* return the values in an intmap *)
40 :     val values: 'a intmap -> 'a list
41 :    
42 :     (* clear an intmap *)
43 :     val clear : 'a intmap -> unit
44 :    
45 :     (* copy an intmap *)
46 :     val copy : 'a intmap -> 'a intmap
47 :     end
48 :    

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