✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What will the following Haskell code display (you can assume that the code works properly and print will output the result of the call to foo)
foo::[Int]->[Int]foo [] = []foo (a:b) = (foo b) ++ [a]print(foo [5,6,7,8])