Elm Exactly
Results / elm-core /

StringWordsLinesTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`String.words` splits `"hello world"` at the space and `String.lines`
splits `"line1\nline2"` at the newline, each into two parts.

Results

elm-0.19.1

passran in 36 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
words1: ["hello","world"]
lines1: ["line1","line2"]

elm-0.19.2

passran in 56 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
words1: ["hello","world"]
lines1: ["line1","line2"]

elm-0.19.3

passran in 60 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
words1: ["hello","world"]
lines1: ["line1","line2"]

lamdera-1.5.0

passran in 64 ms
Output
words1: ["hello","world"]
lines1: ["line1","line2"]

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-core/StringWordsLinesTest] in its title.

Source

The -- CHECK: lines give the expected output.

module StringWordsLinesTest exposing (main)
{-| `String.words` splits `"hello world"` at the space and `String.lines`
splits `"line1\nline2"` at the newline, each into two parts.
-}
-- CHECK: words1: ["hello","world"]
-- CHECK: lines1: ["line1","line2"]
import Html exposing (text)
main =
let
_ = Debug.log "words1" (String.words "hello world")
_ = Debug.log "lines1" (String.lines "line1\nline2")
in
text "done"