Elm Exactly
Results / elm-core /

ArrayUnsafeGetFloatElementTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Array.get 0` on an `Array Float` of 1.5 and 2.5 returns `Just 1.5`.

Results

elm-0.19.1

passran in 75 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 1.5
match: True

elm-0.19.2

passran in 74 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 1.5
match: True

elm-0.19.3

passran in 52 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 1.5
match: True

lamdera-1.5.0

passran in 77 ms
Output
result: Just 1.5
match: True

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module ArrayUnsafeGetFloatElementTest exposing (main)
{-| `Array.get 0` on an `Array Float` of 1.5 and 2.5 returns `Just 1.5`.
-}
-- CHECK: result: Just 1.5
-- CHECK: match: True
import Array
import Html exposing (text)
main =
let
arr =
Array.fromList [ 1.5, 2.5 ]
result =
Array.get 0 arr
_ =
Debug.log "result" result
_ =
Debug.log "match" (result == Just 1.5)
in
text "done"