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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/library/dynamic-array.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/library/dynamic-array.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 245, Sat Apr 17 18:47:12 1999 UTC revision 411, Fri Sep 3 00:25:03 1999 UTC
# Line 1  Line 1 
1    (*
2     * Dynamic (dense) array.
3     *
4     * -- Allen
5     *)
6    
7  structure DynamicArray :  structure DynamicArray :
8    sig include ARRAY_SIG    sig include ARRAY
9        val baseArray : 'a array -> 'a Array.array        val baseArray : 'a array -> 'a Array.array
10          val checkArray: 'a array * 'a Array.array -> unit
11        val clear     : 'a array * int -> unit        val clear     : 'a array * int -> unit
12    end =    end =
13    struct    struct
# Line 20  Line 27 
27       fun clear (ARRAY(a,def,cnt),n) = (a := A.array(n,def); cnt := n)       fun clear (ARRAY(a,def,cnt),n) = (a := A.array(n,def); cnt := n)
28    
29       fun baseArray(ARRAY(ref a,_,_)) = a       fun baseArray(ARRAY(ref a,_,_)) = a
30         fun checkArray(ARRAY(ref a,_,_),a') = if a = a' then () else raise Match
31    
32       fun length (ARRAY (ref a,_,ref n)) = n       fun length (ARRAY (ref a,_,ref n)) = n
33    
# Line 85  Line 93 
93    
94  end  end
95    
 (*  
  * $Log$  
  *)  

Legend:
Removed from v.245  
changed lines
  Added in v.411

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