Write functions for the following using the scheme programmi

Write functions for the following using the scheme programming language.

zip function takes two lists and pairs corresponding elements of the lists. If one list is longer than the other, extra elements of the longer list are ignored. For example, (zip ’(1 2 3) ’(a b c)) evaluates to ((1 a) (2 b) (3 c)), and (zip ’(1 2 3) ’()) evaluates to ().

Solution

(define zip (lambda (l1 l2) (map list list1 list2)))

Write functions for the following using the scheme programming language. zip function takes two lists and pairs corresponding elements of the lists. If one list

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site