Question: ; Transform the function below in its tail recursive version ; (define (numZeros lst) ; (if (null? lst) ; 0 ; (+ (if (= 0
; Transform the function below in its tail recursive version ; (define (numZeros lst) ; (if (null? lst) ; 0 ; (+ (if (= 0 (car lst)) 1 0) (numZeros (cdr lst))) ; ) ;) ; The function calculates the number of 0 elements appearing in lst ; Recall that the tail recursive version will need a helper function (define (numZerosHelper lst partial) )
(define (numZeros lst) )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
