Chewing gum on the carpet?

Scrape away the worst, then put ice cubes over the residue until it’s brittle and chip away with a blunt knife.