Closed
Description
I would like to be able to create an array using one of the existing functions for immutable arrays (e.g. range
), and then use it locally within a function, but not return a reference to it. I would also like to be able to do this with a minimum of copying. Currently I think the best I can do is to use thaw
or withArray
, which make a copy of it; if I know that no references to my array can escape I should be able to get away without copying it. Could we possibly add an unsafeThaw
, which has the same type as thaw
but just returns a reference to the same array instead of copying?
Metadata
Metadata
Assignees
Labels
No labels