Summary: CS440: Assignment #1: Introduction to Common Lisp
Assigned Aug. 28th
Due 12:30, Sept. 6th
Solve the Common Lisp problems described in Section 1. Section 2 is a description of the procedure you must
use to turn in your answers. You may discuss these problems with classmates, but your solutions must be your
own. Understanding all problems will help you prepare for quizzes and tests.
1. Using car and cdr, define a function named 4th to return the fourth element of a list.
2. Define a function that takes two arguments and returns the greater of the two.
3. What could occur in place of the x in each of the following exchanges?
(a) USER(1): (car (x (cdr '(a (b c) d))))
(b) USER(1): (x #'list 1 nil)
4. Write each of the following infix expressions in Lisp. Remember, you can use the apropos to look for
functions with certain strings in their names. Check your answers with a calculator.