Pragmatism and the predictive mind