Elm Exactly
Results / elm-core /

ListMap5FloatAggregateTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`List.map5` on five `List Float`s passes the Float elements unchanged to the
mapping function; the sum of 1 to 5 gives `[ 15.0 ]`.

Results

elm-0.19.1

passran in 92 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: [15]
match: True

elm-0.19.2

passran in 40 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: [15]
match: True

elm-0.19.3

passran in 79 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: [15]
match: True

lamdera-1.5.0

passran in 94 ms
Output
result: [15]
match: True

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module ListMap5FloatAggregateTest exposing (main)
{-| `List.map5` on five `List Float`s passes the Float elements unchanged to the
mapping function; the sum of 1 to 5 gives `[ 15.0 ]`.
-}
-- CHECK: result: [15]
-- CHECK: match: True
import Html exposing (text)
main =
let
result =
List.map5 (\a b c d e -> a + b + c + d + e) [ 1.0 ] [ 2.0 ] [ 3.0 ] [ 4.0 ] [ 5.0 ]
_ =
Debug.log "result" result
_ =
Debug.log "match" (result == [ 15.0 ])
in
text "done"