Jump to content

99 Elm Problems/Problem 20

From Wikibooks, open books for an open world

Remove the N'th element from a list.

import Html exposing (text)
import List

removeAt : Int -> List a -> List a
-- your implementation goes here

main = text <| toString <|
  removeAt 2 [1..4]

Result:

[1, 3, 4]

Solutions