Evolutionary responses of communities to extinctions