I know the following sound a homework problem but it not it a study guild I to study but i am stuck. I really need help. I dont want to fail the test tomorrow
The following C code defines Fibonacci function
int fib (int n)
{
if (n == 0) return 0;
else if (n == 1) return 1;
else
return (fib(n-1) + fib(n-2));
}
Define Fibonacci function in Scheme. Use fib as a function name
What does the following Scheme function do? Explain your answer.
(DEFINE (guesslis)
(COND
((NULL? lis) '())
(ELSE (append(guess(CDR lis)) (LIST(CAR lis))))
What is the result of (guess ‘(A B C))? Show the derivation process