Describe in English what these functions compute. Use short descriptive phrases,
ID: 3586679 • Letter: D
Question
Describe in English what these functions compute. Use short descriptive phrases, don’t simply restate the alorithms in English.
2. (25 pts) The following Scheme functions take lists of integers (no nested lists) as arguments (define (a 1) (if (null? 1) 0 (define (b 1) (if (null? 1) o (+ (car 1) (b (cdr l)) (define (c 1) (if (null? 1) 1 (define (d 1) (if (null? 1) 0 (define (e l) (if (null? 1) 0 (+ (if ((car 1) 42) 1 0) Describe in English what these functions compute. Use short descriptive phrases, don't simply restatExplanation / Answer
Functions Output a returns the number of integers in the list l (list size) b returns the sum of all integers in the list l c returns the product of all integers in the list l d returns the largest integer in the list l e return how many 42 s are in the list l