![]() |
||
![]() |
Department of
Mathematics and Computer Science |
![]() |
![]() |
Math 61
|
|
Data Structure Concepts: LISTS AND LISP |
This assignment is to familiarize you with the list-processing language LISP.
1) Re-do the sample session given in the LISP 2 web page. (You should turn in a script copy of your session--see below.)
2) Compose a function called MAKELIST which makes a list of the first n integers, i.e.,
(MAKELIST 5)returns (1 2 3 4 5).
3) Compose a function called SELECT which selects the n-th element of the list given, i.e.,
(SELECT '(2 3 4 5) 2)returns 3.
4) Compose a recursive FACTORIAL function (base it on the exponential function), and run BOTH the recursive version and the iterative version in the class notes to compute 50!
NOTES:
(I may have copies of this software in my office--if you wish, bring me a disk so you can get a copy in my office. There are also manuals in files on the distribution disk.)
This page is maintained by Dennis C. Smolarski, S.J., dsmolarski@math.scu.edu. Last changed: 12 January 2000.