Generate delete fn.