PreviousUpNext

15.3.359  src/lib/src/char-map.api

## char-map.api
## AUTHOR:   John Reppy
##          AT&T Bell Laboratories
##          Murray Hill, NJ 07974
##          jhr@research.att.com

# Compiled by:
#     src/lib/std/standard.lib




# Fast, read-only, maps from characters to values.
#

api Char_Map {

     Char_Map(X);
        #  A finite map from characters to X 

     make_char_map:  { default:  X, namings:  List( (String, X) ) } -> Char_Map(X);
        # make a character map which maps the bound characters to their
        # namings and maps everything else to the default value.

     map_char:  Char_Map(X) -> Char -> X;
        #  map the given character 

     map_string_char:  Char_Map(X)  -> ((String, Int)) -> X;
        #  (mapStrChr c (s, i)) is equivalent to (mapChr c (string::get_byte_as_char (s, i))) 

  }; #  CHAR_MAP 



## COPYRIGHT (c) 1994 by AT&T Bell Laboratories.  See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext