QuestionDetails: Explain procedures, show all your work andcompiler result of th
ID: 3617842 • Letter: Q
Question
QuestionDetails: Explain procedures, show all your work andcompiler result of the program using PLTdrschemeExercise 2.25. Give combinations of cars andcdrs that will pick 7 from each of the following lists:(1 3 (5 7) 9)
((7))
(1 (2 (3 (4 (5 (6 7))))))
QuestionDetails:
Explanation / Answer
#lang slideshow (define a (list 1 3 (list 5 7) 9)) (car (cdr (car (cdr (cdr a))))) Result : 7 > ----------------------------------------------------- #lang slideshow (define a (list (list 7))) (car (car a)) Result : 7 > -------------------------------------------------------- #lang slideshow (define a (list 1 (list 2 (list 3 (list 4 (list 5 (list 67))))))) (car (cdr (car (cdr (car (cdr (car (cdr (car (cdr (car (cdra)))))))))))) Result : 7 > http://i39.tinypic.com/348r4wn.jpg
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.