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
19 stars 9 forks source link

Bug in simplification of String.words and String.lines #300

Closed w0rm closed 6 months ago

w0rm commented 6 months ago

String.words "" or String.lines "" actually return [""], not an empty list. It is not intuitive, but it is what it is 😄

elm repl
---- Elm 0.19.1 ----------------------------------------------------------------
Say :help for help and :exit to exit! More at <https://elm-lang.org/0.19.1/repl>
--------------------------------------------------------------------------------
> String.lines ""
[""] : List String
> String.words ""
[""] : List String