Phylogeny and cultural history in ontogeny