Between the Workshop and the State: training human capital in railroad companies in Mexico and Chile, 1850-1930