ListMapTypeMismatchTest
Checks `List.map` with a function from `Int` to `Bool`, testing which elements of `[1, -1, 2]` are positive.
Results
elm-0.19.1
passran in 89 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. result: [True,False,True]
elm-0.19.2
passran in 85 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. result: [True,False,True]
elm-0.19.3
passran in 62 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. result: [True,False,True]
lamdera-1.5.0
passran in 49 msOutput
result: [True,False,True]
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/ListMapTypeMismatchTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ListMapTypeMismatchTest exposing (main)
{-| Checks `List.map` with a function from `Int` to `Bool`, testing which elements
of `[1, -1, 2]` are positive.
-}
-- CHECK: result: [True,False,True]
import Html exposing (text)
main =
let
result =
List.map (\x -> x > 0) [ 1, -1, 2 ]
_ = Debug.log "result" result
in
text "done"