List.intersperse a [] --> [] already exist. Possible additions:
List.intersperse a [ b ]
--> [ b ]
-- which includes for example
List.intersperse a << List.singleton
--> List.singleton
List.intersperse a [ b, c ]
--> [ b, a, c ]
I imagine the last one is controversial because you sometimes expect to add more elements to the list in the future or just want make the separators the rule, like
Since we also don't for example fix List.sum [ a, b ] to a + b it probably makes sense to not add this check to simplify (but to something like miniBill/elm-review-optimize)
List.intersperse a [] --> []
already exist. Possible additions:I imagine the last one is controversial because you sometimes expect to add more elements to the list in the future or just want make the separators the rule, like
Since we also don't for example fix
List.sum [ a, b ]
toa + b
it probably makes sense to not add this check tosimplify
(but to something like miniBill/elm-review-optimize)