Question: You are given the following function. k :: [[a]] [[a]] -> [[a]] k (x:xs) [] = k xs [x] k [] (y:ys) = y:ys k
You are given the following function. k :: [[a]] [[a]] -> [[a]] k (x:xs) [] = k xs [x] k [] (y:ys) = y:ys k (x:xs) ys = k xs (x:ys) Which of the following statements is true? This function will concatenate any two lists. This function reverses a list. This function might sometimes cause a pattern-matching error. This function will run forever even for finite inputs. None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
