jfmengels / elm-review-simplify

Provides elm-review rules to simplify your Elm code
https://package.elm-lang.org/packages/jfmengels/elm-review-simplify/latest/
BSD 3-Clause "New" or "Revised" License
20 stars 9 forks source link

Add Dict.foldlr simplifications and make existing Dict functions with extra arg generic #254

Closed lue-bird closed 9 months ago

lue-bird commented 9 months ago

Dict simplifications should now be on par with Set (except for insert)

-- same for foldr
Dict.foldl f initial Dict.empty
--> initial

Dict.foldl (\_ soFar -> soFar) initial dict
--> initial

Bonus: Convert existing manual Dict operation checks that exist because the function takes 2 args to more generic helpers.