Question: 1-Draw the internal representation for the following lisp list(s). (cons '() apple orange ((grape)) banana)) '()). (cons '(Red (Yellow Blue)) '(( Yellow Orange)) (cons '((()apple

 1-Draw the internal representation for the following lisp list(s). (cons '()

1-Draw the internal representation for the following lisp list(s). (cons '() apple orange ((grape)) banana)) '()). (cons '(Red (Yellow Blue)) '(( Yellow Orange)) (cons '((()apple ()) orange (grape ()) banana)) '(apple)) 0 0 2-Determine the output of the following functions (You must show your works) (caaar '((((() apple ()) orange (grape) banana)) apple)) [caddr '((( (Green Blue)) Red (Yellow ()) Blue)) (cadadr'( orange ((()) (grape () (apple)) banana))) 0 3-Give combinations of cars and cdrs that will pick 7 from each of the following lists , (1 (23) 7), (((1 (7)))), and (102(3(4(5(6(7))))))) 4-Fully explain the following scheme procedure. (define (x lis) (cond ((null? lis) 0) ((not (list? (car lis))) (cond ((eq? (car lis) #f) (x (cdr lis))) (else (+ 1 (x (cdr lis)))))) (else (+ (x (car lis)) (x (cdr lis)))) 1-Draw the internal representation for the following lisp list(s). (cons '() apple orange ((grape)) banana)) '()). (cons '(Red (Yellow Blue)) '(( Yellow Orange)) (cons '((()apple ()) orange (grape ()) banana)) '(apple)) 0 0 2-Determine the output of the following functions (You must show your works) (caaar '((((() apple ()) orange (grape) banana)) apple)) [caddr '((( (Green Blue)) Red (Yellow ()) Blue)) (cadadr'( orange ((()) (grape () (apple)) banana))) 0 3-Give combinations of cars and cdrs that will pick 7 from each of the following lists , (1 (23) 7), (((1 (7)))), and (102(3(4(5(6(7))))))) 4-Fully explain the following scheme procedure. (define (x lis) (cond ((null? lis) 0) ((not (list? (car lis))) (cond ((eq? (car lis) #f) (x (cdr lis))) (else (+ 1 (x (cdr lis)))))) (else (+ (x (car lis)) (x (cdr lis))))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!