Often, the unless-expression-in-for-loop-to-unless-keyword rule (and its corresponding when-based rule) rewrites this:
(for ([v (in-list vs)])
(unless (good? v)
(raise-arguments-error ...)))
to this:
(for ([v (in-list vs)]
#:unless (good? v))
(raise-arguments-error ...))
I don't think that's an improvement. I think these rules should only remove a when or unless from a loop if it has more than one body form inside it.
Often, the
unless-expression-in-for-loop-to-unless-keywordrule (and its correspondingwhen-based rule) rewrites this:(for ([v (in-list vs)]) (unless (good? v) (raise-arguments-error ...)))to this:
(for ([v (in-list vs)] #:unless (good? v)) (raise-arguments-error ...))I don't think that's an improvement. I think these rules should only remove a
whenorunlessfrom a loop if it has more than one body form inside it.