411 REFERENCE · Wikibooks
99 Elm Problems/Problem 12/Solutions
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Solution 1: Recursive version
decodeModified list =
case list of
[] -> []
Single x :: xs -> x :: decodeModified xs
Multiple n x :: xs -> List.repeat n x ++ decodeModified xs