Help me understand if foreach/2 has a bug, or if I'm confused

Not sure if you want to go through it all, but “does foreach/2 have a bug” is not a new question :smiley:

See here: Foreach bug?

I am quite sure there are also older discussions on the same topic.