You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yes, it has to. vectors are flat, prepending/appending a single element requires a vector with 1 additional slot! Theres perhaps alternative design approaches which would do a memmove/reallocation, but thats kinda not something in vector as its designed.
uncons/unsnoc can be O(1), via slicing.
if you know of an O(1) worst case approach that works for flat sequence in virtual memory structures rather than nested pointer/references, please do share.
That's what the documentation on Hackage says. I would have expected them to be O(1).
The text was updated successfully, but these errors were encountered: