jfmengels/elm-review-simplify
View on GitHubSimplify `List.filterMap (\foo -> if x then Just foo else Nothing)` to `List.filter (\foo -> x)`
Open
#340 opened on Feb 25, 2025
enhancementhelp wanted
Repository metrics
- Stars
- (22 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Example of things the rule would report:
List.filterMap (\foo -> if x then Just foo else Nothing)
--> List.filter (\foo -> x)
Example of things the rule would not report:
List.filterMap (\foo -> if x then Just (foo + 2) else Nothing)
I am looking for:
- Someone to implement it with/for me