In Defense of Repetition In Code

I recently came across a lot of people 1 2 3 saying that this code from the game Balatro is awful: I wouldn't say it's ideal, but I also don't think it's awful. There is plenty to defend about the approach here, and not nearly enough of that defense in the various comment sections discussing it for my tastes, so I'm going to go ahead and defend it myself here. I'm by no means an expert in Lua, but…