I was curious to read about what Darwin had to say about the existance of locally adapted subpopulations. I discovered to my surprise that the expressions and terms "local adaptation", "spatial heterogeneity" (or just "heterogeneity" even) and "environment" are completely absent from On the origin of Species. The expression "local conditions" was found 12 times but I could not find a place where he would suggest subpopulation of the same species could be locally adapted to their environmental conditions.
Who were the first authors to talk about subpopulations being locally adapted to their environmental conditions? Who were the first authors to understand the role that migration plays in reducing local adaptation?