Question: I really need help to solve this program,pls help me to solve this use R5RS,It is better to have notes. Remember: . (car ) returns
I really need help to solve this program,pls help me to solve this use R5RS,It is better to have notes.
Remember: . (car ) returns the "back" of the list as a list o (cdr '(1 2 3 4)) + '(2 3 4) Part A: Using car and cdr, write a function called get-second-item that takes a list as parameter and returns the 2nd item in the list (get-second-item '(1 2 3 4)) + 2 NOTE: Don't worry if the list is smaller than 2. You don't need to program in any checks. Part B: Using car and cdr, write a function called get-third-item that takes a list as a parameter and returns the 3r item in the list (get-third-item '(1 2 3 4)) 3 NOTE: Don't worry if the list is smaller than 3. You don't need to program in any checks. Remember: . (car
) returns the "back" of the list as a list o (cdr '(1 2 3 4)) + '(2 3 4) Part A: Using car and cdr, write a function called get-second-item that takes a list as parameter and returns the 2nd item in the list (get-second-item '(1 2 3 4)) + 2 NOTE: Don't worry if the list is smaller than 2. You don't need to program in any checks. Part B: Using car and cdr, write a function called get-third-item that takes a list as a parameter and returns the 3r item in the list (get-third-item '(1 2 3 4)) 3 NOTE: Don't worry if the list is smaller than 3. You don't need to program in any checks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
