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 String.concat on List.repeat call simplifications #213

Closed lue-bird closed 11 months ago

lue-bird commented 11 months ago

Adds the last String simplification from #2

String.concat (List.repeat n str)
--> String.repeat n str

including composition.

Bonus: Corrected test names.

I'm thinking we could add the same for String.concat (List.intersperse s strings) --> String.join s strings

github-actions[bot] commented 11 months ago

The branch can be tried out by running:

elm-review --template jfmengels/elm-review-simplify/preview
jfmengels commented 11 months ago

I'm thinking we could add the same for String.concat (List.intersperse s strings) --> String.join s strings

That sounds good :+1: I'll add it to #2

lue-bird commented 11 months ago

Nice! I imagine the intent is to have these new utilities make it to our other existing simplifications?

Exactly right.