(cdr x) ( "x" - ) , . , , , apple : '((apple bob car) (cat dig) (e))). , , , (apple bob car).
To remove only the "apple", you need to find out if the first item in the list that you received was itself a list, and if it collected a list consisting of this list with the first element removed (hint: recursion), and then the remaining part of your original list. If this first item is not a list, you simply return the rest of the list.
source
share