Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] View of /sml/trunk/src/system/Basis/Implementation/mono-array.sig
ViewVC logotype

View of /sml/trunk/src/system/Basis/Implementation/mono-array.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1350 - (download) (as text) (annotate)
Fri Sep 5 21:34:27 2003 UTC (19 years ago) by mblume
File size: 1428 byte(s)
a lot of Basis hacking, among other things adding slices
(* mono-array.sig
 *
 * COPYRIGHT (c) 1994 AT&T Bell Laboratories.
 *
 * Generic interface for monomorphic array structures.
 *
 *)

signature MONO_ARRAY =
  sig

    eqtype array
    type elem
    type vector

    val maxLen : int

  (* array creation functions *)
    val array    : int * elem -> array
    val fromList : elem list -> array
    val tabulate : int * (int -> elem) -> array

    val length   : array -> int
    val sub      : array * int -> elem
    val update   : array * int * elem -> unit

    val vector   : array -> vector
    val copy     : { src : array, dst : array, di : int } -> unit
    val copyVec  : { src : vector, dst : array, di : int } -> unit


    val appi   : (int * elem -> unit) -> array -> unit
    val app    : (elem -> unit) -> array -> unit
    val modifyi: (int * elem -> elem) -> array -> unit
    val modify : (elem -> elem) -> array -> unit

    val foldli : (int * elem * 'a -> 'a) -> 'a -> array -> 'a
    val foldri : (int * elem * 'a -> 'a) -> 'a -> array -> 'a
    val foldl  : (elem * 'a -> 'a) -> 'a -> array -> 'a
    val foldr  : (elem * 'a -> 'a) -> 'a -> array -> 'a

    val findi   : (int * elem -> bool) -> array -> (int * elem) option
    val find    : (elem -> bool) -> array -> elem option
    val exists  : (elem -> bool) -> array -> bool
    val all     : (elem -> bool) -> array -> bool
    val collate : (elem * elem -> order) -> array * array -> order

  end

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