Elm Exactly
Results / elm-core /

ListLengthTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`List.length` returns 0, 3 and 5 for lists of those lengths.

Results

elm-0.19.1

passran in 84 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
len1: 0
len2: 3
len3: 5

elm-0.19.2

passran in 47 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
len1: 0
len2: 3
len3: 5

elm-0.19.3

passran in 48 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
len1: 0
len2: 3
len3: 5

lamdera-1.5.0

passran in 84 ms
Output
len1: 0
len2: 3
len3: 5

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module ListLengthTest exposing (main)
{-| `List.length` returns 0, 3 and 5 for lists of those lengths.
-}
-- CHECK: len1: 0
-- CHECK: len2: 3
-- CHECK: len3: 5
import Html exposing (text)
main =
let
_ = Debug.log "len1" (List.length [])
_ = Debug.log "len2" (List.length [1, 2, 3])
_ = Debug.log "len3" (List.length [1, 2, 3, 4, 5])
in
text "done"