411 REFERENCE · Wikibooks
99 Elm Problems/Problem 4
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Elm provides the function List.length. See if you can implement it.
import Html exposing (text)
import List
myLength: List a -> Int
-- your implementation goes here
main =
text <| toString <| myLength[1,2,3,4,3,2,1]
Result:
7
Solutions