When I saw the concat function in a Haskell book, I was wondering how I can flatten the list below in Haskell. In Python, I can do this because I can check its type in a function. But in Haskell, I could not. How can I flatten the list below?
input: [[1, 2], [[2, 3], 5], [[[2, 3], [4, 5]], [2, 3]]]
output: [1, 2, 2, 3, 5, 2, 3, 4, 5, 2, 3]
user319824
source
share