Cognitive ontogeny and phylogeny