Jonathan Edwards, The Works of Jonathan Edwards, p. 117.
God can answer prayer, though He bestow not the very thing for which we pray. He can sometimes better answer the lawful desires and good end we have in prayer another way. If our end be our own good and happiness, God can perhaps better answer that end in bestowing something else than in the bestowment of the very thing which we ask. And if the main good we aim at in our prayers be attained, our prayer in answered.
Jonathan Edwards, The Works of Jonathan Edwards, p. 117.