< 99 Elm Problems
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
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.