Elm Exactly
Results / elm-core /

ListMapTypeMismatchTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
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 ms
Output
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 ms
Output
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 ms
Output
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 ms
Output
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"