Creativity and reason in cognitive development