Replace the head of a list