Replace conditionals in match
with #:when
#389
Labels
new lint
Issues suggesting new lints or pull requests implementing new lints
match
with #:when
#389
Saw a few cases in racket/typed-racket#1410 where
#:when
would clean up various bits of pattern matching code:This should probably only trigger when the pattern is small. It should also only trigger on match expressions that already have multiple branches, since the single-branch case would be clearer as a
match-define
. A two-casecond
instead of anif
should also count.The text was updated successfully, but these errors were encountered: