# Pastebin 3lMua9X3 I have written a function flattening the tree however it does not have the pattern matching you suggest, at least doesnt need it, However i still pass and empty listTree :: Tree a -> [a] listTree = foldTree f z where f l x r = l ++ [x] ++ r z = []