resyntax
resyntax copied to clipboard
Suggest optimizing `for/last` expressions
The for/last form evaluates the loop body every iteration, even though it often only needs to evaluate it on the last iteration. This is very wasteful when the loop body is computing something whose side effects don't matter. Resyntax ought to suggest something to optimize this, either by manually extracting the body out or by using a new keyword we could add to for/last that tells it to only evaluate the last loop body.