Paw-sitively brilliant: Some dogs can classify their toys by function, new study finds
It's a mental trick called "label extension." Humans use it when we realize a hammer and a rock can both drive a nail, or that a mug and a glass both count as "cups."