My wife asked me: Buy sausages, if you’ll find eggs, buy 10. What happens next?
<code>if eggs >= 10 then buy(sausages, eggs=10);</code>
<code>if sausages > 0 then buy(sausages); if eggs >= 10 then buy(eggs, 10);</code>
<code>buy(sausages); if eggs >= 10 then buy(eggs, 10);</code>
The 3rd option is dangerous one because it could end up with never-ending run in the city looking for sausages, never buying eggs and never coming back home.
…and more. Why?
Asking me to make shopping, my wife did not stick to the principles of valid inference and correct reasoning. That’s the reason why not everybody can be a programmer :-)