ListRangeTest
`List.range` lists the integers from its first argument to its second inclusive, and gives an empty list when the first is greater. `List.range 1 5` gives 1 to 5, `List.range 5 1` gives `[]`, and `List.range 3 3` gives `[3]`.
Results
elm-0.19.1
passran in 83 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. range1: [1,2,3,4,5] range_empty: [] range_single: [3]
elm-0.19.2
passran in 92 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. range1: [1,2,3,4,5] range_empty: [] range_single: [3]
elm-0.19.3
passran in 69 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. range1: [1,2,3,4,5] range_empty: [] range_single: [3]
lamdera-1.5.0
passran in 78 msOutput
range1: [1,2,3,4,5] range_empty: [] range_single: [3]
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/ListRangeTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ListRangeTest exposing (main)
{-| `List.range` lists the integers from its first argument to its second inclusive, and gives an empty list when the first is greater.
`List.range 1 5` gives 1 to 5, `List.range 5 1` gives `[]`, and `List.range 3 3` gives `[3]`.
-}
-- CHECK: range1: [1,2,3,4,5]
-- CHECK: range_empty: []
-- CHECK: range_single: [3]
import Html exposing (text)
main =
let
_ = Debug.log "range1" (List.range 1 5)
_ = Debug.log "range_empty" (List.range 5 1)
_ = Debug.log "range_single" (List.range 3 3)
in
text "done"