[MLton-user] Order of Vector.tabulate
Vesa Karvonen
vesa.a.j.k at gmail.com
Wed Mar 25 07:28:40 PST 2009
On Wed, Mar 25, 2009 at 4:34 PM, Neal Glew <neal at glew.name> wrote:
> Is it reasonable or not to assume that Vector.tabulate (n, f) will
> call f 0, f 1, ..., and then f (n-1)? For example, if g reads
> something from a file and I write Vector.tabulate (n, fn _ => g ())
> will I get a vector of somethings from the file in order?
It is and yes. The order is specified in the Basis Library spec. See
http://www.standardml.org/Basis/vector.html#SIG:VECTOR.tabulate:VAL
and
http://www.standardml.org/Basis/list.html#SIG:LIST.tabulate:VAL .
-Vesa Karvonen
More information about the MLton-user
mailing list