Perils of Thinking Unknown Author

Perils of Thinking

A centipede was happy quite,
Until a frog in fun
Said, “Pray, which leg comes after which?”
This raised her mind to such a pitch,
She lay distracted in the ditch
Considering how to run.