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

Diff of /smlnj-lib/trunk/Util/dynamic-array-sig.sml

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

revision 3336, Wed May 13 12:46:49 2009 UTC revision 3337, Wed May 13 13:17:00 2009 UTC
# Line 1  Line 1 
1  (* dynamic-array-sig.sml  (* dynamic-array-sig.sml
2   *   *
3   * COPYRIGHT (c) 1999 Bell Labs, Lucent Technologies.   * COPYRIGHT (c) 2009 The Fellowship of SML/NJ (http://www.smlnj.org)
4     * All rights reserved.
5   *   *
6   * Signature for unbounded polymorphic arrays.   * Signature for unbounded polymorphic arrays.
  *  
7   *)   *)
8    
9  signature DYNAMIC_ARRAY =  signature DYNAMIC_ARRAY =
# Line 56  Line 56 
56      val truncate : ('a array * int) -> unit      val truncate : ('a array * int) -> unit
57        (* truncate (a,sz) makes every entry with index > sz the default value *)        (* truncate (a,sz) makes every entry with index > sz the default value *)
58    
59  (** what about iterators??? **)      val vector : 'a array -> 'a vector
60          (* return the array's contents as a vector *)
61    
62      (* standard array iterators *)
63        val appi : (int * 'a -> unit) -> 'a array -> unit
64        val app : ('a -> unit) -> 'a array -> unit
65        val modifyi : (int * 'a -> 'a) -> 'a array -> unit
66        val modify : ('a -> 'a) -> 'a array -> unit
67        val foldli : (int * 'a * 'b -> 'b) -> 'b -> 'a array -> 'b
68        val foldri : (int * 'a * 'b -> 'b) -> 'b -> 'a array -> 'b
69        val foldl : ('a * 'b -> 'b) -> 'b -> 'a array -> 'b
70        val foldr : ('a * 'b -> 'b) -> 'b -> 'a array -> 'b
71        val findi : (int * 'a -> bool) -> 'a array -> (int * 'a) option
72        val find : ('a -> bool) -> 'a array -> 'a option
73        val exists : ('a -> bool) -> 'a array -> bool
74        val all : ('a -> bool) -> 'a array -> bool
75        val collate : ('a * 'a -> order) -> 'a array * 'a array -> order
76    
77    (* TODO
78        val copy : {di:int, dst:'a array, src:'a array} -> unit
79        val copyVec : {di:int, dst:'a array, src:'a vector} -> unit
80    *)
81    
82    end (* DYNAMIC_ARRAY *)    end (* DYNAMIC_ARRAY *)
83    

Legend:
Removed from v.3336  
changed lines
  Added in v.3337

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