-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Description
I'm a bit confused about the documentation for modify in both Data.Vector and Data.Vector.Generic:
-- | Apply a destructive operation to a vector. The operation will be
-- performed in place if it is safe to do so and will modify a copy of the
-- vector otherwise.
It's unclear to me how we can possibly detect it is "safe" to perform the operation in-place given that, due to the type signature, the caller is free to pass the input again to another function. Indeed the implementation is just modify p = new . New.modify p . clone which looks like it does an unconditional copy.
Metadata
Metadata
Assignees
Labels
No labels