Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2013/functional-programming-design-and-analysis-of-algorithms/2/c/solution

Use list concatenation as the combining operation and the empty list as the seed:
concat :: [[a]] -> [a]
concat = foldr (++) []
For three inner lists, this constructs xs ++ (ys ++ (zs ++ [])), preserving the elements' original order. The concise answer is .

New to topics? Read the docs here!