Elm Exactly
Results / elm-core /

MaybeMapStringToBoolTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Maybe.map` with a String -> Bool function produces a `Maybe Bool`: mapping `String.isEmpty` over `Just ""` gives `Just True`.

Results

elm-0.19.1

passran in 59 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: Just True

elm-0.19.2

passran in 49 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: Just True

elm-0.19.3

passran in 47 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: Just True

lamdera-1.5.0

passran in 70 ms
Output
result: Just True

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module MaybeMapStringToBoolTest exposing (main)
{-| `Maybe.map` with a String -> Bool function produces a `Maybe Bool`: mapping `String.isEmpty` over `Just ""` gives `Just True`.
-}
-- CHECK: result: Just True
import Html exposing (text)
main =
let
result =
Maybe.map String.isEmpty (Just "")
_ = Debug.log "result" result
in
text "done"