Problem 20 Solution

dropAt : Int -> List a -> List a
dropAt n list =
    case list of
        [] ->
            []

        x :: xs ->
            (List.take (n - 1) list) ++ (List.drop n list)

Back to problem

results matching ""

    No results matching ""