Problem Solving Lab #3

Problem Solving Lab #3
Lisp

This lab is being done in order to help you learn various topics discussed in lecture. For attendance, you will all be asked to submit to try. You should work in pairs, but if there are free machines you can work alone. You are not required to do anything if you don't finish (although you may want to try some of the exercises to increase your understanding of the material).


Part I - The Basics of Lisp

We are going to use the CMU Common Lisp version of Lisp that is found on the Sun machines. If you type lisp at the command prompt, you will go into the Lisp interpreter. You can type (quit) while in the interpreter you can exit back to the shell prompt. During this lab you may run into an error condition. In this case, you can type :abort in order to exit out of that particular interpreter error state.

As long as you are editing a file with the .lisp extension, emacs should enter lisp mode automagically. If it doesn't, then you can force it to enter lisp mode by with: M-x lisp-mode. You can also start lisp up in emacs by using M-x run-lisp. The lisp that emacs runs should be CMUCL Lisp.

If you would like more of a development environment, please read Using Emacs as a Lisp IDE (pdf doc).

If you would like to look at CMUCL documentation, please see the manual.

For now, let's get started on lisp. Please enter the lisp interpreter and do the following: