All in all, yes, you should expect O (1) from ! although I am not sure that this is guaranteed by the standard.
You might want to see a vector package if you need faster arrays (through the use of stream merging). It is also better designed.
Note that // is probably O (n), although due to the fact that it must cross the list (just like an urgent program). If you need a big mutation, you can use MArray or MVector .
alternative
source share