Essays in the economic theory of adaptation to a changing environment