The mouthparts of a caterpillar and its butterfly serve drastically different functions with minimal energy loss because they arise from the same basic morphological pattern.
"A caterpillar straddles the rim of a leaf and its jaws, like tiny secateurs, clip away neat semicircular holes and erode the leaf at a prodigious speed. A couple of months later, a butterfly pauses briefly on a flower and uncurls a long 'tongue' or proboscis with which it probes the heart of the bloom to suck up nectar. The butterfly was once the caterpillar, but since its metamorphosis it has adopted a completely different diet, and consequently its mouthparts have had to change shape dramatically. The mouthparts of both butterfly and caterpillar, however, are formed from the same basic pattern, a pattern shared by all insects. Just as birds' beaks are adapted to their eating habits, so too are insect mouthparts." (Foy and Oxford Scientific Films 1982:159)
Learn more about this functional adaptation.