Here’s my code:
(define step1_list1 '(1 3 (5 7) 9))
(car (cdr (cdr (step1_list1))))
(define step1_list2 '((7)))
(car (step1_list2))
(define step1_list3 '(1 (2 (3 (4 (5 (6 7)))))))
(car (cdr (cdr (cdr (cdr (cdr step1_list3))))))
))
Running this code causes an error:
(1 3 (5 7) 9) is not applicable
What is the problem?
Start small.
Run each of those in turn, and see what you get at each step. Once you understand why you get the output you do, then you should be able to fix the code in your question.