When my mule was about 10 months old, she pitched a fit at me one day. I was grooming another horse and she came up and struck a pose that clearly said, "Pet ME!" I ignored her. She stomped her foot. I ignored her. She stomped her foot again. She was demanding my attention. I ignored her. She laid her ears back in pure devilment, snaked her head out and nipped me on the arm.
I exploded, waving my arms and running at her. This spooked the other horses and they startled, but soon realized they were not in trouble, so settled back down. I ran that silly mule away from the herd for over 30 minutes, just like a correcting mare momma would have done. She wanted very badly to come back to the herd, making licking motions and finally, out of breath, I let her come back.
Smart? You better believe it. After 7 years, she has never, ever nipped or even showed an inclination to even want to.