Code Simplification Pass
Paste code to get a complexity-reduction pass that swaps over-engineered solutions and hand-rolled reimplementations for built-in language or library features. The simplified version is shown side by side with the original, and only genuine simplifications are suggested — if a change would alter behavior in edge cases, or the code is already about as simple as it can get, it says so instead of forcing a rewrite.
Look at this code and suggest a simpler implementation that achieves the same result. Prioritize: fewer lines, less state, built-in language/library features over custom code. Show the simplified version side by side with the original. Only suggest changes that are genuinely simpler — don't trade one kind of complexity for another. If the code is already optimal, say so.
{{code}}