99 Elm Problems/Problem 21/Solutions
(Redirected from 99 Elm Problems/More Lists/Problem 21: Insert an element/Solutions)
Solution 1: Using List.take
and List.drop
insertAt n value list =
List.take (n-1) list ++ value :: List.drop (n-1) list