Implementation of deleteat!