Folklore is the engine. Gogol grew up in Ukrainian villages where the Devil and the parish priest were equally familiar neighbors, and the stories collected he…