example of an invariant site:stackoverflow.com - Search