BookmarkBookmarked What does the following Scheme function d
BookmarkBookmarked
What does the following Scheme function do?
(define (y s lis)
(cond ((null? lis) \'() )
((equal? s (car lis)) lis)
(else (y s (cdr lis)))
))
Solution
What does the following Scheme function do?
(define (y s lis)
(cond ((null? lis) \'() )
((equal? s (car lis)) lis)
(else (y s (cdr lis)))
))
Answer:-
y returns the given list with leading elements removed up to but not including the first occurrence of the first given parameter.
