1 (* Copyright (C) 2009 Matthew Fluet.
2 * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
9 signature ARRAY_STRUCTS =
11 include VECTOR_STRUCTS
13 val update: 'a t * int * 'a -> unit
20 val array: int * 'a -> 'a t (* synonym for new *)
21 val fromVector: 'a vector -> 'a t
22 val getAndSet: 'a t -> (int -> 'a) * (int * 'a -> unit)
23 val modify: 'a t * ('a -> 'a) -> unit
24 val shuffle: 'a t -> unit
25 (* Put random elements in the first n positions. *)
26 val shuffleN: 'a t * int -> unit
27 val swap: 'a t * int * int -> unit
28 val toVector: 'a t -> 'a vector
29 val toVectorMap: 'a t * ('a -> 'b) -> 'b vector
30 val update: 'a t * int * 'a -> unit