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

SCM Repository

[smlnj] View of /smlnj-lib/trunk/Util/char-map-sig.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 5 months ago) by monnier
Original Path: sml/trunk/src/smlnj-lib/Util/char-map-sig.sml
File size: 811 byte(s)
bring revisions from the vendor branch to the trunk
(* char-map-sig.sml
 *
 * COPYRIGHT (c) 1994 by AT&T Bell Laboratories.  See COPYRIGHT file for details.
 *
 * Fast, read-only, maps from characters to values.
 *
 * AUTHOR:  John Reppy
 *	    AT&T Bell Laboratories
 *	    Murray Hill, NJ 07974
 *	    jhr@research.att.com
 *)

signature CHAR_MAP =
  sig

    type 'a char_map
	(* a finite map from characters to 'a *)

    val mkCharMap : {default : 'a, bindings : (string * 'a) list} -> 'a char_map
	(* make a character map which maps the bound characters to their
	 * bindings and maps everything else to the default value.
	 *)

    val mapChr : 'a char_map -> char -> 'a
	(* map the given character *)
    val mapStrChr : 'a char_map -> (string * int) -> 'a
	(* (mapStrChr c (s, i)) is equivalent to (mapChr c (String.sub(s, i))) *)

  end (* CHAR_MAP *)


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