411 REFERENCE · Wikibooks
99 Elm Problems/Problem 7/Solutions
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Solution 1: Recursive version
flatten list =
case list of
Elem e -> [ e ]
NestedList [] -> []
NestedList (head :: tail) -> flatten head ++ flatten (NestedList tail)