3
answers
0
watching
228
views
16 Oct 2018
9. 14 marks. Consider the following Scheme functions, (define (deira x) (cond [(even? x) 2: else 1])) (define (multiply-some numbers) (cond [(empcy? numbers) [else (* (delta (firs!. numbers)) (multiply-some (rest runders))))) Write a condensed trace, showing the recursive calls of multiply. sone and calls to delca, for the following expression. Put one step on each line. You may not need all the lines. (multiply-some (cons 21 (cons 4 icons 62 emp'y))))
9. 14 marks. Consider the following Scheme functions, (define (deira x) (cond [(even? x) 2: else 1])) (define (multiply-some numbers) (cond [(empcy? numbers) [else (* (delta (firs!. numbers)) (multiply-some (rest runders))))) Write a condensed trace, showing the recursive calls of multiply. sone and calls to delca, for the following expression. Put one step on each line. You may not need all the lines. (multiply-some (cons 21 (cons 4 icons 62 emp'y))))
29 Jun 2023
Nelly StrackeLv2
17 Oct 2018
Already have an account? Log in