99 Elm Problems/Problem 4
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