16 And what is the intention of the Scripture which teaches us that Peter fasted, and that the revelation concerning the baptism of Gentiles was made to him when fasting and praying, except to show that the Saints themselves advance when they fast. Finally, Moses received the Law when he was fasting; and so Peter when fasting was taught the grace of the New Testament. Daniel too by virtue of his fast stopped the mouths of the lions and saw the events of future times. And what safety can there be for us unless we wash away our sins by fasting, since Scripture says that fasting and alms do away sin?
Source: Letters (New Advent)