It seems to be a different poet:
The Centipede's Dilemma
A centipede was happy quite,Until a frog in funSaid, "Pray, which leg comes after which?"This raised her mind to such a pitch,She lay distracted in the ditchConsidering how to run.– Mrs. Edmund Craster (1871)