Question: this is haskell- Consider the function flatten that returns the list of all the values contained in a tree: flatten :: Tree a [a] flatten

this is haskell-
Consider the function flatten that returns the list of all the values contained in a tree: flatten :: Tree a [a] flatten (Leaf x) = [x] flatten (Node x r) = flatten r ++ [x] ++ flatten it flattens the tree in Question 4. to the list: a. [18,14,12,10,8,6,2] O b. [2,6,8,10,12,14,18] O c. [10,6,14,2,8,12,18] d. [2,8,12,18,6,14,10]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
