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 Array.isEmpty simplifications #178

Closed jfmengels closed 11 months ago

jfmengels commented 11 months ago

Adds all the simplifications for Array.isEmpty mention in #169

I didn't mention the Array.isEmpty (Array.initialize 2 f) to False (same for repeat) in the changelog nor documentation.

At the moment, we get 2 errors when doing Array.isEmpty (Array.fromList []). What do you think, is that a problem? I think it's okay, and I don't have a nice way around this. We'll have the same problem if we see repeat 0 or repeat 1 (or with initialize).

Can be reviewed commit by commit.