[MLton] Monadic MLton.Vector.create with update

Henry Cejtin henry.cejtin@sbcglobal.net
Thu, 30 Mar 2006 14:04:49 -0600


It  wouldn't  help  much  for  the  growing case, but one thing that could be
implemented would be a kind of array shrink primitive.   You  would  have  to
make  sure  that  none  of  the  now  unused  space at the end didn't contain
pointers, and the next GC would view it as garbage.

I guess one could then implement the unknown size thing by doubling on  full,
and finally doing the in-place shrink.

It is pretty ugly I guess.