Something a bit more supernatural today. F. Ansty is probably best known for his 1882 fantasy Vice Versa, which was been filmed several times. He also wrote Tourmalin's Time Cheques (1891), an early time-paradox tale.
The Brass Bottle (1900) by F. Anstey
"...offers a fruitfully funny situation as a gratefully released genie showers its benefactor with increasingly embarrassing boons...", David Langford, The Encyclopedia of Fantasy.