[MLton-user] Order of Vector.tabulate
Henry Cejtin
henry.cejtin at sbcglobal.net
Wed Mar 25 08:26:10 PST 2009
The official SML Basis Library says that
Vector.tabulate (n, f)
is equivalent to
Vector.fromList (List.tabulate (n, f))
and also says that List.tabulate creates the list from left to right, so it
certainly looks to me like the result is completely determined.
----- Original Message ----
From: Neal Glew <neal at glew.name>
To: mlton-user at mlton.org
Sent: Wednesday, March 25, 2009 9:34:53 AM
Subject: [MLton-user] Order of Vector.tabulate
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? If not,
what should I use instead?
Neal
_______________________________________________
MLton-user mailing list
MLton-user at mlton.org
http://mlton.org/mailman/listinfo/mlton-user
More information about the MLton-user
mailing list