ListEmptyTest
The empty list `[]` logs as `[]` and `List.isEmpty []` is `True`.
Results
elm-0.19.1
passran in 76 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. empty: [] isEmpty: True
elm-0.19.2
passran in 68 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. empty: [] isEmpty: True
elm-0.19.3
passran in 57 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. empty: [] isEmpty: True
lamdera-1.5.0
passran in 78 msOutput
empty: [] isEmpty: True
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/ListEmptyTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ListEmptyTest exposing (main)
{-| The empty list `[]` logs as `[]` and `List.isEmpty []` is `True`.
-}
-- CHECK: empty: []
-- CHECK: isEmpty: True
import Html exposing (text)
main =
let
_ = Debug.log "empty" []
_ = Debug.log "isEmpty" (List.isEmpty [])
in
text "done"