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 Random.list simplifications #132

Closed lue-bird closed 1 year ago

lue-bird commented 1 year ago
Random.list 0 generator
--> Random.constant []

-- not part of the summary
Random.list -1/-2/-3/... generator
--> Random.constant []

Random.list 1 generator
--> Random.map List.singleton generator

Random.list n (Random.constant el)
--> Random.constant (List.repeat n el)

part of #109

lue-bird commented 1 year ago

The last 2 commits are unrelated. They only correct the normalization test "should normalize an operator application" with the new elm-syntax upgrade so that the CI and the local setup are happy