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 /smlnj-lib/trunk/Util/char-map-sig.sml
ViewVC logotype

Annotation of /smlnj-lib/trunk/Util/char-map-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download)
Original Path: sml/trunk/src/smlnj-lib/Util/char-map-sig.sml

1 : monnier 2 (* char-map-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 1994 by AT&T Bell Laboratories. See COPYRIGHT file for details.
4 :     *
5 :     * Fast, read-only, maps from characters to values.
6 :     *
7 :     * AUTHOR: John Reppy
8 :     * AT&T Bell Laboratories
9 :     * Murray Hill, NJ 07974
10 :     * jhr@research.att.com
11 :     *)
12 :    
13 :     signature CHAR_MAP =
14 :     sig
15 :    
16 :     type 'a char_map
17 :     (* a finite map from characters to 'a *)
18 :    
19 :     val mkCharMap : {default : 'a, bindings : (string * 'a) list} -> 'a char_map
20 :     (* make a character map which maps the bound characters to their
21 :     * bindings and maps everything else to the default value.
22 :     *)
23 :    
24 :     val mapChr : 'a char_map -> char -> 'a
25 :     (* map the given character *)
26 :     val mapStrChr : 'a char_map -> (string * int) -> 'a
27 :     (* (mapStrChr c (s, i)) is equivalent to (mapChr c (String.sub(s, i))) *)
28 :    
29 :     end (* CHAR_MAP *)
30 :    

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