[MLton] MLton.Vector.create
Henry Cejtin
henry.cejtin@sbcglobal.net
Tue, 28 Mar 2006 11:27:17 -0600
As I said when we spoke, I definitely like it. I would make it so that
calling sub after create returns also raises Fail.
Also, I wonder if it is worth while having something just like create that
takes a tabulate function instead of a single element for the initial value
of the array/vector. I'm thinking of cases where there is no natural value
for all the elements, but only a different one for each element. An example
might be when each entry needs its own ref cell some where.
Of course one can always fake this from the given create, but it is pretty
ugly. (In fact, I guess that the case where n = 0 actually might be hard to
even fake if the tabulate function diverges.)