deleteList function (MACRO)