On The Origin of Species by Charles Darwin Chapter 6 Page 108

We have seen that a species under new conditions of life may change its habits, or it may have diversified habits, with some very unlike those of its nearest congeners. Hence we can understand, bearing in mind that each organic being is trying to live wherever it can live, how it has arisen that there are upland geese with webbed feet, ground woodpeckers, diving thrushes, and petrels with the habits of auks.

Although the belief that an organ so perfect as the eye could have been formed by natural selection, is enough to stagger any one; yet in the case of any organ, if we know of a long series of gradations in complexity, each good for its possessor, then under changing conditions of life, there is no logical impossibility in the acquirement of any conceivable degree of perfection through natural selection.