Apple has implemented a new feature on the iTunes Store where you will now get a credit for any songs you purchased earlier if you later decide to buy the corresponding album. In the past, if you bought a single and then later decided to buy the entire album, you were charged again for album version of the song. Apple hopes that this feature will stop deterring and perhaps even encourage people from buying full albums after purchasing a single.
There is a catch though. You must purchase the album within 180 days of the single purchase in order to get the credit back. Mac Rumors also indicates that this feature does not work on all albums.