Experiment with built-in functions for lists. 1. Use (list) to create an empty list, 2. Use (list

Question:

Experiment with built-in functions for lists.

1. Use (list) to create an empty list, 2. Use (list 342) to create a list with a single element 342.

3. Use (car (list 342)) to get the first element of the previously defined list.

4. Use (cdr (list 342)) to get the rest of the elements of the previously defined list.

5. Use (null? (list)) to check if the list created in part 1 is an empty list.

6. Use (cons 541 (list 342)) to append an element at the beginning of the list created in part 2.

7. Use (cadr (list 541 342)) to get the second element of the list.

8. Use (caddr (list 641 541 342)) to get the third element of the list.

9. Use the function length to find the length of the list created by the expression (list).

10. Use the function append to concatenate a list with a single element 3 with another list with a single element 4.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: