9 lines
227 B
Text
9 lines
227 B
Text
xs = [[1], 2, [[3,4], 5], [[[]]], [[[6]]], 7, 8, []]
|
|
|
|
flat = flat' []
|
|
where flat' n [] = n
|
|
flat' n (x::xs)
|
|
| x is List = flat' (flat' n xs) x
|
|
| else = x :: flat' n xs
|
|
|
|
flat xs
|