logo

Crowdly

Browser

Add to Chrome

What will the following Haskell code display (you can assume that the code works...

✅ 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])

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.concordia.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome