The function of prayer is to change our own minds, to put on the mind of Christ, to enable grace to break into us. When prayer is privatized religion on a spree, it's anything but prayer. Contemplative prayer, converting prayer, is prayer that sees the whole world through incense -- a holy place, a place where the sacred dwells, a place to be made different by those who pray, a place where God sweetens living with the beauty of all life. Contemplative prayer is prayer that leads us to see our world through the eyes of God. It unstops our ears to hear the poverty of widows, the loneliness of widows, the vulnerability of children, the struggle of outcasts, the humanity of enemies, the insights of the uneducated, the tensions of the bureaucrats, the fears of the rulers, the wisdom of the holy, the power of the powerless.
Prayer leads us and leavens us and enlightens us. The function of prayer is certainly not to cajole God into saving us from ourselves. "Please God don't let us die in a nuclear war, or at the hands of terrorists" surely is not real prayers. The function of prayer is not magic. The function of prayer is most assuredly not about changing the mind of God about decisions we have already made in ourselves.
The function of prayer is to change our own minds.