ListMap4FloatAggregateTest
`List.map4` on four `List Float`s passes the Float elements unchanged to the mapping function; `10 + 1 - 2 - 3` gives `[ 6.0 ]`.
Results
elm-0.19.1
passran in 64 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. result: [6] match: True
elm-0.19.2
passran in 91 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. result: [6] match: True
elm-0.19.3
passran in 99 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. result: [6] match: True
lamdera-1.5.0
passran in 85 msOutput
result: [6] match: True
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/ListMap4FloatAggregateTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ListMap4FloatAggregateTest exposing (main)
{-| `List.map4` on four `List Float`s passes the Float elements unchanged to the
mapping function; `10 + 1 - 2 - 3` gives `[ 6.0 ]`.
-}
-- CHECK: result: [6]
-- CHECK: match: True
import Html exposing (text)
main =
let
result =
List.map4 (\a b c d -> a + b - c - d) [ 10.0 ] [ 1.0 ] [ 2.0 ] [ 3.0 ]
_ =
Debug.log "result" result
_ =
Debug.log "match" (result == [ 6.0 ])
in
text "done"