I want to frame your first sentence. Abstract code discussions are absurd. I’ve learnt to mostly ignore programming blogs if they don’t include some concrete code.
In a small example, excessive duplication is not a problem, and excessive DRYness is not a problem.
Therefore, it makes some sense to me to leave out code, and just hope the reader has personal experience to draw relevant examples from.