Some nucleophiles are added to carbonyls, lose a proton to drop a positive charge, and have a lone pair again. If the (former) carbonyl oxygen also has a lone pair, a potential lone-pair/lonepair repulsion problem exists. Partly for this reason, two heteroatoms bonded to one carbon often present an inherently unstable situation. These kinds of species often decompose readily via pi donation.
In pi donation, a lone pair on one heteroatom is donated to the carbon shared by both heteroatoms. As a result, the other heteroatom is pushed off the carbon. This event is helped if one of the heteroatoms is already protonated, so that it comes off as a neutral species.
Fill in any missing lone pairs, provide curved arrows to show pi donation, and show the resonance structures that result.
Show how each of the following species might break down into two molecules via pi donation.
As a result of pi donation, neutral, protic nucleophiles often replace the carbonyl oxygen entirely. In effect, the nucleophile adds twice. The lone pair that is revealed after a deprotonation step adds again to the same carbon, pushing that carbonyl oxygen out of the molecule entirely. In the case of alcohol nucleophiles, a ketal or acetal results. This kind of molecule looks like two ethers that meet at one carbon. A ketal is a "masked" carbonyl; it still contains a carbon with two bonds to oxygen. However, a ketone is no longer an electrophile like a carbonyl compound.
Imines also result from pi donation. If an primary amine donates to a carbonyl, it can lose its first proton to reveal a lone pair. Once that lone pair donates, pushing off the carbonyl oxygen, a second proton can be dropped to allow the nitrogen to lose its positive charge. Imines are similar to carbonyls in that they contain a carbon-heteroatom double bond and so they are still good electrophiles.