Question: why is this the right answer? Consider the function fun :: Num a => [a] -> [a] fun (x:y:xs) = (x + y): (fun (y:xs))

why is this the right answer?
Consider the function fun :: Num a => [a] -> [a] fun (x:y:xs) = (x + y): (fun (y:xs)) fun _ = 0 Which is the best description of the return value (RETURNS) of fun l? Select one alternative: The pairs of consecutive elements of I A list of numbers that is shorter than I A list of consecutive elements of I Lists of consecutive elements of The sums of consecutive elements of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
