Language processing. Check. Very advanced.
Common sense. Fail.
It worked as expected. It did what you said.
But not what you meant.
Sounds right to me! int cartons = ( have_eggs() ? 6 : 1 );