Genetic diversity helps populations adapt to environmental change.