From rapaport@cs.Buffalo.EDU Mon Feb 24 14:51:14 1997 Selmer; Dunno; check with Stu. I'll fwd your query to him. I'll also ask around re lisp for pc's. -Bill From rapaport@cs.Buffalo.EDU Mon Feb 24 15:18:48 1997 | From ekoontz@cedar.buffalo.edu Mon Feb 24 14:56 EST 1997 | From: Eugene J Koontz | Subject: Re: Common Lisp for PC's? | To: rapaport@cs.Buffalo.EDU (William J. Rapaport) | Date: Mon, 24 Feb 1997 14:56:30 -0500 (EST) | MIME-Version: 1.0 | Content-Transfer-Encoding: 7bit | | > | > Selmer Bringsjord, CS at RPI, asked me if I know of any good | > implementations of Common Lisp for PCs. Can any of you help him? | > | > He wants it to use in classes that use Stu's textbook. (He already | > uses SNePS in his AI classes!) | > | > -Bill | > | > | > | > | ACL is available for Windows. | I use ACL for Linux, which is available for free(!) I have a CD if | someone wants to borrow it. | The URL for ACL is http://www.franz.com | -Joe | | From rapaport@cs.Buffalo.EDU Mon Feb 24 15:25:11 1997 | From rchopra@cedar.buffalo.edu Mon Feb 24 15:06 EST 1997 | Date: Mon, 24 Feb 1997 15:05:56 -0500 | From: Rajiv Chopra | To: rapaport@cs.Buffalo.EDU | Subject: Re: Common Lisp for PC's? | X-Newsreader: TIN [UNIX 1.3 unoff BETA release 961101] | | In article <5esrj5$5ao@prometheus.acsu.buffalo.edu> you wrote: | : Selmer Bringsjord, CS at RPI, asked me if I know of any good | : implementations of Common Lisp for PCs. Can any of you help him? | | He might want to read this first: | http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/lisp/part4/faq-doc-1.html | | From rapaport@cs.Buffalo.EDU Mon Feb 24 15:26:19 1997 | From shapiro@cs.buffalo.edu Mon Feb 24 15:20 EST 1997 | Date: Mon, 24 Feb 1997 15:19:21 -0500 | From: "Stuart C. Shapiro" | MIME-Version: 1.0 | To: "William J. Rapaport" | CC: cs-consult, snerg | Subject: Re: Common Lisp for PC's? | Content-Transfer-Encoding: 7bit | | William J. Rapaport wrote: | > | > Selmer Bringsjord, CS at RPI, asked me if I know of any good | > implementations of Common Lisp for PCs. Can any of you help him? | > | > He wants it to use in classes that use Stu's textbook. (He already | > uses SNePS in his AI classes!) | > | > -Bill | | acl is available free for PCs running linux, a version of UNIX. | -- | Stuart C. Shapiro, Professor and Chair | Department of Computer Science | State University of New York at Buffalo | 226 Bell Hall, Buffalo, NY 14260-2000, U.S.A. | PHONE: 716-645-3180x125 FAX: 716-645-3464 | shapiro@cs.buffalo.edu http://www.cs.buffalo.edu/~shapiro/ | From rapaport@cs.Buffalo.EDU Mon Feb 24 15:26:40 1997 | From jsantore Mon Feb 24 15:21 EST 1997 | Date: Mon, 24 Feb 1997 15:20:58 -0500 (EST) | From: johnsantore | To: "William J. Rapaport" | cc: cs-consult@dnoces.cs.Buffalo.EDU | Subject: Re: Common Lisp for PC's? | MIME-Version: 1.0 | | | | > Selmer Bringsjord, CS at RPI, asked me if I know of any good | > implementations of Common Lisp for PCs. Can any of you help him? | | I'm not sure which Operating System They are using. But for Linux on the | PC Franz has a free implementation of Allegro Common Lisp (for non | commercial use) that I've been told is quite good, I know some of the | people in the AI class used it to do their first project. | | For windows They also offer a few products that are not free. I used a | trial version and didn't have problems with it but I was certianly not | putting it through any real stress tests. | | http://www.franz.com/ | | is the web address from which the Free Linux version can be ordered | | Hope this helps some | -john Santore | From rapaport@cs.Buffalo.EDU Mon Feb 24 15:27:03 1997 | From ecuddihy Mon Feb 24 15:21 EST 1997 | From: Elisabeth Cuddihy | Subject: Re: Common Lisp for PC's? | To: snerg, cs-consult | Date: Mon, 24 Feb 1997 15:21:20 -0500 (EST) | MIME-Version: 1.0 | Content-Transfer-Encoding: 7bit | | > Selmer Bringsjord, CS at RPI, asked me if I know of any good | > implementations of Common Lisp for PCs. Can any of you help him? | > | > He wants it to use in classes that use Stu's textbook. (He already | > uses SNePS in his AI classes!) | | Allegro Common Lisp is available for PCs running either Linux or Windows. | The linux version is free (they even pay to ship you the CD :) and full | (not partially disabled, etc.). The Windows version costs money if you | want to the full version but is free if you ask for Allegro CL-Lite. I'm | not quite sure what you get in the CL-Lite package. | | You can order free CD's from Allegro right off of their web page and from | what I have heard, it takes 2-6 weeks for them to get the CD to you. I | am expecting the CL for Linux CD sometime in the near future. | | Look at the Franz home page for more info on the Allegro products: | | http://www.franz.com/ | | | -Elisabeth | | | | From rapaport@cs.Buffalo.EDU Tue Feb 25 12:00:22 1997 Received: from adara.cs.Buffalo.EDU (rapaport@adara.cs.Buffalo.EDU [128.205.34.3]) by mail1.its.rpi.edu (8.8.5/8.8.5) with ESMTP id MAA69126 for ; Tue, 25 Feb 1997 12:00:21 -0500 Received: (rapaport@localhost) by adara.cs.Buffalo.EDU (8.8.5/8.6.4) id MAA23253 for brings@rpi.edu; Tue, 25 Feb 1997 12:00:24 -0500 (EST) Date: Tue, 25 Feb 1997 12:00:24 -0500 (EST) From: "William J. Rapaport" Message-Id: <199702251700.MAA23253@adara.cs.Buffalo.EDU> To: brings@rpi.edu Subject: lisp X-UIDL: 131f0201de9fddd72f6e4660bfe41fd9 Status: R | From goetz Mon Feb 24 16:58 EST 1997 | From: Phil Goetz | Subject: Re: Common Lisp for PC's? | To: snerg | Date: Mon, 24 Feb 1997 16:58:19 -0500 (EST) | MIME-Version: 1.0 | Content-Transfer-Encoding: 7bit | | > Selmer Bringsjord, CS at RPI, asked me if I know of any good | > implementations of Common Lisp for PCs. Can any of you help him? | > | > He wants it to use in classes that use Stu's textbook. (He already | > uses SNePS in his AI classes!) | > | > -Bill | | If you don't get ACL, SNePS will also run under CMUCL, the Carnegie | Mellon Common Lisp. Elisabeth says she gets errors with it, though. | I've had no problems. | | Phil | From rapaport@cs.Buffalo.EDU Tue Feb 25 12:00:40 1997 Received: from adara.cs.Buffalo.EDU (rapaport@adara.cs.Buffalo.EDU [128.205.34.3]) by mail1.its.rpi.edu (8.8.5/8.8.5) with ESMTP id MAA12386 for ; Tue, 25 Feb 1997 12:00:39 -0500 Received: (rapaport@localhost) by adara.cs.Buffalo.EDU (8.8.5/8.6.4) id MAA23267 for brings@rpi.edu; Tue, 25 Feb 1997 12:00:57 -0500 (EST) Date: Tue, 25 Feb 1997 12:00:57 -0500 (EST) From: "William J. Rapaport" Message-Id: <199702251700.MAA23267@adara.cs.Buffalo.EDU> To: brings@rpi.edu Subject: lisp X-UIDL: b31cd74ab6711279be92595a2b64e66b Status: R | From campos@cs.buffalo.edu Mon Feb 24 17:02 EST 1997 | Date: Mon, 24 Feb 1997 17:03:27 -0500 | From: Daniel Campos | X-Sender: Daniel Campos | MIME-Version: 1.0 | To: "William J. Rapaport" | Subject: Re: Common Lisp for PC's? | X-Priority: Normal | | | ------------590F323F57072 | Content-Transfer-Encoding: 7bit | Content-Type: text/plain; charset=us-ascii | | I have a CD-ROM with the version of ACL for LINUX. I'm running it in a | Pentium100 with 16MB and it works fine. SNePS run withouth problems on | it (since now). | | Daniel | | | ------------590F323F57072 | Content-Transfer-Encoding: 7bit | Content-Type: text/html; charset=us-ascii | | | |
I have a  CD-ROM with the version of ACL for LINUX. I'm running it | in a Pentium100 with 16MB and it works fine. SNePS run withouth problems | on it (since now).
| |
 
| |
Daniel
| |
 
| | | | ------------590F323F57072-- | | From burhans@cs.Buffalo.EDU Wed Mar 5 14:49:21 1997 Received: from rhyme.cs.Buffalo.EDU (burhans@rhyme.cs.Buffalo.EDU [128.205.35.8]) by mail1.its.rpi.edu (8.8.5/8.8.5) with ESMTP id OAA41292 for ; Wed, 5 Mar 1997 14:49:17 -0500 Received: (burhans@localhost) by rhyme.cs.Buffalo.EDU (8.8.5/8.6.4) id OAA02855 for brings@rpi.edu; Wed, 5 Mar 1997 14:49:10 -0500 (EST) From: Debra Thomas Burhans Message-Id: <199703051949.OAA02855@rhyme.cs.Buffalo.EDU> Subject: LISP class To: brings@rpi.edu Date: Wed, 5 Mar 1997 14:49:10 -0500 (EST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-UIDL: 93325499ad200c1fb2f42b08a0025a86 Status: R Hi Selmer I'm going to send you a few files now, starting with the latex of my syllabus from last fall. I'll also send a couple of "answer sheet" files. If you want them all, I'll make a tar file and mail that ... just wanted to get something to you now, I've been incredibly busy with writing up an NSF proposal with Stu. We are keeping our fingers crossed... The lisp class here meets once a week for 2 hours in a lab, where each student is sitting at an X workstation. I generally would spend about 20 - 30 mins discussing the new material and going over new concepts, then the students would have the rest of the time to work on the assigned exercises. Some complained that it was too much work for 1 credit -- it's tough because students in this class have to have completed just the 2 introductory CS course sequence, but it helps a lot if they have had a class like programming languages. I had them use on-line submission each week to submit their answers, and sometimes other files as well like the project file. I have a wonderful detailed supplementary description of the Eliza project that Stu wrote up -- will send that if you're interested, let me know. Grading policy (initiated by Stu) was based on how far they got in the book. I didn't assign letter grades to any assignment, just "done" or "not done", and students who made mistakes could correct them and resubmit for full credit. Since they don't always finish the work, there is a pretty broad range of grades. I wouldn't say that someone finishing this class is a great lisp programmer, but they have a start on it at least :-) Debbie -- Debra Thomas Burhans tel:(716) 645-2879 fax:(716) 645-3464 Department of Computer Science E-mail: burhans@cs.buffalo.edu University at Buffalo WWW: http://www.cs.buffalo.edu/~burhans From burhans@cs.Buffalo.EDU Wed Mar 5 14:49:43 1997 Received: from rhyme.cs.Buffalo.EDU (burhans@rhyme.cs.Buffalo.EDU [128.205.35.8]) by mail1.its.rpi.edu (8.8.5/8.8.5) with ESMTP id OAA67886 for ; Wed, 5 Mar 1997 14:49:43 -0500 Received: (burhans@localhost) by rhyme.cs.Buffalo.EDU (8.8.5/8.6.4) id OAA02862 for brings@rpi.edu; Wed, 5 Mar 1997 14:49:33 -0500 (EST) Date: Wed, 5 Mar 1997 14:49:33 -0500 (EST) From: Debra Thomas Burhans Message-Id: <199703051949.OAA02862@rhyme.cs.Buffalo.EDU> To: brings@rpi.edu Subject: LISP syllabus X-UIDL: 9213317625f564bf1b7538fe894d283d Status: R \documentclass[11pt]{article} \usepackage{fullpage} \usepackage{smallertitle} \begin{document} \noindent {\bf CS202 L1 PROGRAMMING IN LISP Fall 1996}\\ \noindent 338 Bell Hall MONDAY 2:00 - 4:00 pm 1 credit\\ \noindent {\bf Instructor:} Debra T. Burhans, 333 Bell Hall, 645-2879 \begin{verbatim} \end{verbatim} \noindent {\bf Office Hours:} Monday $4-5$pm Tuesday $10:30-11:30$am\\ (and by appointment)\\ \noindent {\bf Required Text:} S. C. Shapiro, Common Lisp: An Interactive Approach, Computer Science Press, 1992.\\ \noindent {\bf Schedule:} \begin{verbatim} September 9 Chapters 1-4 numbers, lists, arithmetic September 16 Chapters 5-9 strings, symbols, packages, lists, quote **** September 23 NO CLASS **** Yom Kippur September 30 Chapters 10-11 defining functions, using packages October 7 Chapters 12-13 saving functions, predicates October 14 Chapters 14-15 conditional statement, recursion October 21 Chapter 16 recursion October 28 Chapter 17 recursion November 4 Chapter 18 trees November 11 Chapters 19-21 evaluator, function arguments, mapping fns November 18 Chapters 22-23 applicator, macros November 25 Chapters 24-28 assignment, scope, sequencing, local vars December 2 Chapters 29-30 I/O, destructive list manipulation December 9 Chapters 33-34 CLOS -- object oriented programming in LISP \end{verbatim} \noindent {\bf Course Description:} \\ This course is an introduction to the LISP programming language. There are several requirements for the course. ATTENDANCE is required at all classes. If you must miss a class please inform the instructor via email. If you miss more than 1 class without good reason it will affect your final grade. READING must be done to prepare for class. Each week you should read the chapters in Shapiro that will be covered in the next lab. If you don't read ahead, it will be very difficult if not impossible to complete the assignments during the lab meeting. ASSIGNMENTS will be given weekly. You should have time to complete them during class. If not, the lab is open at other times during the week. They must be submitted by Saturday of the week in which they are assigned unless you make arrangements to do otherwise. There is a PROJECT which you will be working on. The details of the project will be given later in the semester. You will be working on the project throughout the second half of the semester as part of your weekly lab assignment. You should not have to work on your project outside of regular class time, though you may do so if you wish. \noindent Notice that the answers to about one-third of the programming exercises appear in Appendix A. \\ \noindent {\bf Newsgroup:} You should subscribe to the newsgroup sunyab.cs.202 and read it regularly. Please post questions about homework there. I will monitor the newsgroup and repond to any questions you post.\\ \noindent {\bf Class Notes:} Files containing notes and other important information are in the directory \begin{verbatim} ~burhans/CS202/Fall96 \end{verbatim} For each week $i$ there will be a file with the name week$i$.cl This is a template file for your answers to the assigned exercises for that week, along with any other important comments. You should copy this file into your directory and use it as an answer sheet. When you complete the weekly assignment, you should submit the file to the instructor by executing a submission program. Details of how to submit your exercises have been posted to the newsgroup. Make sure you use the week$i$.cl naming convention! If there is any problem with the work you submit, the instructor will send you e-mail about it so that you can redo and resubmit it.\\ \noindent {\bf Grading:} Your grade will depend on how far you get through the text and on your attendance. You must attend all classes, no matter how far you get through the exercises! The association of chapters and grades is shown in the following table. For example, to earn a grade of B, you must satisfactorily complete Chapter 22 AND attend all class meetings. \begin{verbatim} 14 D 20 B- 15 D+ 22 B 16 C- 23 B+ 17 C 25 A- 18 C+ 27 A \end{verbatim} \noindent {\bf Environment:} You will be using Allegro Common Lisp (acl) on an X-terminal connected to armstrong. In the lab you will run acl from within emacs or xemacs. You will set up your emacs/lisp environment during the first lab.\\ \noindent Remember, when logging out from an X-terminal, you should manually kill all X clients first. \end{document} From burhans@cs.Buffalo.EDU Wed Mar 5 14:50:48 1997 Received: from gagarin.cs.Buffalo.EDU (burhans@gagarin.cs.Buffalo.EDU [128.205.32.10]) by mail1.its.rpi.edu (8.8.5/8.8.5) with ESMTP id OAA71704 for ; Wed, 5 Mar 1997 14:50:47 -0500 Received: (burhans@localhost) by gagarin.cs.Buffalo.EDU (8.8.5/8.6.4) id OAA09235 for brings@rpi.edu; Wed, 5 Mar 1997 14:50:45 -0500 (EST) Date: Wed, 5 Mar 1997 14:50:45 -0500 (EST) From: Debra T Burhans Message-Id: <199703051950.OAA09235@gagarin.cs.Buffalo.EDU> To: brings@rpi.edu Subject: LISP stuff X-UIDL: 7b6452cb167d9748bb1d7726181a98fe Status: R ;;; Week 3 CS 202 ;;; ;;; NAME: ;;; ;;; Chapter 10 ;;; ;;; Defining and calling functions in LISP ;;; ;;; Please show the LISP interaction for each thing you do, ;;; and if there is a question please also answer it with a short ;;; statement ;;; ;;; NOTE: where I have written "load this function into LISP" ;;; you should cut and paste the function into the LISP buffer at the LISP ;;; listener prompt. ;;; Show the LISP interaction for each problem given. ;;; ---------- EXERCISES --------------------------------------------- (1) load this function into LISP (defun list3 (o1 o2 o3) "Returns a list of its three arguments in order." (cons o1 (cons o2 (cons o3 '())))) (2) call list3 with these three arguments: 'a '(b) 'c (3) call list3 with these three arguments: "hi" (+ 9 10) 'there NOTE that as mentioned in class LISP evaluates all arguments to a function, hence, (+ 9 10) is evaluated and its value is 19 (4) use the documentation function to retrieve the documentation string for the function list3 (if you don't know how to use this function, look in the chapter) (5) LISP has predefined functions first, second, third, ... tenth to retrieve elements from the corresponding positions in a list. Test out 5 of these built in functions using lists of your choosing. Make sure that one of your examples uses a list that is shorter than the position specified. For example, you might try sixth on a 5-element list: (6) load this function into LISP (defun switch (2-elt-list) "Given a 2 member list, returns a list just like it, but with the two members interchanged." (list2 (second 2-elt-list) (first 2-elt-list))) (7) try to call it with the following command NOTE that it will put you into the debugger -- stay there for the next exercise: (switch '(a b)) You are in the debugger because list2 is an undefined function. Type the following while still in the debugger: :loc 2-elt-list (8) What do you think :loc does? (9) Now get OUT of the debugger and load this function (list2) into LISP (defun list2 (elt-1 elt-2) "returns a list of its two arguments in order" (cons elt-1 (cons elt-2 '()))) (10) try the switch call again (switch '(a b)) (11) What happened? (12) Now you will use the built-in LISP function trace. Trace allows you to trace the execution of a function in LISP. Type the following line to turn tracing on for switch, first, second, and list2 (trace switch first second list2) (13) type the following: (switch '(a b)) (14) Describe what you saw when you used trace (15) Now turn tracing off for these functions using the function untrace (untrace first second switch list2) (16) Look at the following two sample LISP functions. Load them into LISP and call them with a few different numbers, putting your results below the function definitions. (defun add-2 (x) "adds 2 to the argument and returns that value" (+ x 2)) (defun times-3 (x) "multiplies the argument by 3 and returns that value" (* 3 x)) (17) Write a function called my-square that squares a number. Make sure you follow the above style, including documentation string and indentation! Load it into LISP and test it for the numbers 3, 8, and -2, showing your results. (18) Using first, second and third define a function called reverse3 to return the reverse of a three member list. Make sure that this function takes in ONE argument, which should be a three element list. Note that you currently have no way of enforcing the type of the argument! --------------------------------------------------------------- ;;; Chapter 11 ;;; 11.1 Starting on page 71 read and work through everything in the ;;; chapter text -- type everything next to the > prompts and show the ;;; results. Note that the results may not correlate exactly with ;;; what is printed in the book --- At the top of p.73 is where you ;;; start typing. Note that the syntax of LISP has changed, instead of ;;; typing (in-package 'learn) at the top of page 73, you should type ;;; (defpackage learn) followed by (in-package learn). This will ;;; create the package called learn, then move into that package. ;;; When you just want to move into a package that already exists, you ;;; use the in-package function - remember not to quote the package ;;; name (this is a change from the syntax in the book). So, to move ;;; into the learn package once it has been created, type (in-package learn) ;;; REMINDER: before you decide to use a symbol, check to make sure it ;;; isn't ALREADY defined by LISP using the describe function. If it already ;;; has a value, you may need to shadow it ;;; 11.3 DO problem 11.3 in the book. Please make sure that you define your ;;; discrim function in the LEARN package!!! Go to that package before you ;;; do this problem. The function should have three arguments. Here is a ;;; skeletal form for your function, you need to write the LISP code to ;;; do the calculation. (defun discrim (a b c) "returns the value of the discriminant, (sqrt (b**2 - 4ac))" ;; here's where you write the actual expression to be evaluated ) ; NOTE this is the final parenthesis at the END of the function ;;; HELPFUL INFORMATION: useful built in LISP functions you might want are: ;;; sqrt - takes 1 argument returns its positive square root, eg,(sqrt 4) ;;; expt - takes 2 arguments, (expt 5 2) raises 5 to the power 2 ;;; remember that notation is Cambridge prefix, (* 8 9 4) means 8 * 9 ;;; * 4, (+ 2 3) means 2 + 3, etc. ;;; PUT your function definition right here, include the LISP interaction ;;; where you typed the function at the LISP prompt and LISP returned the ;;; function name ;;; NOW test your discrim function for these values: a=2, b=7 and c=5 ;;; put the result of calling (discrim 2 7 5) here! From burhans@cs.Buffalo.EDU Wed Mar 5 14:51:12 1997 Received: from gagarin.cs.Buffalo.EDU (burhans@gagarin.cs.Buffalo.EDU [128.205.32.10]) by mail1.its.rpi.edu (8.8.5/8.8.5) with ESMTP id OAA44334 for ; Wed, 5 Mar 1997 14:51:12 -0500 Received: (burhans@localhost) by gagarin.cs.Buffalo.EDU (8.8.5/8.6.4) id OAA09279 for brings@rpi.edu; Wed, 5 Mar 1997 14:51:10 -0500 (EST) Date: Wed, 5 Mar 1997 14:51:10 -0500 (EST) From: Debra T Burhans Message-Id: <199703051951.OAA09279@gagarin.cs.Buffalo.EDU> To: brings@rpi.edu Subject: LISP stuff X-UIDL: 351bee9d06c12d869b718d21b03446c3 Status: R ;;; week 9 -- chapters 19, 20, 21 ;;; CS 202 ;;; SUBMIT this file with exercises completed in it as week9.cl ;;; there are no new exercises for match.cl, but I want you to submit ;;; match.cl this week by Saturday so I can see how far you are ;;; Chapter 19 -- the evaluator ;;; ;;; examples `(cons ,pi (list "are" "squared")) `(cons pi (list "are" "squared")) ;;; lazy evaluation -- note that LISP functions to generate infinite ;;; lists can be written (defun natural-numbers-from (n) "returns an infinite list of the natural numbers starting from n using the lazy evaluation technique" (check-type n integer) `(,n :promise natural-numbers-from ,(1+ n))) ;;; example calls (natural-numbers-from 7) (natural-numbers-from 0) ;;; now we need some functions that will unpack what this function ;;; returns, ie, the :promise keyword (defun lazy-first (list) "returns the first member of list redeeming a promise if necessary" (check-type list list) (if (eql (first list) :promise) (first (eval (rest list))) (first list))) ;;; you can send this function a list produced by natural-numbers-from (lazy-first '(7 :PROMISE NATURAL-NUMBERS-FROM 8)) ;;; now comes lazy-rest -- how do we express the "rest", which is an ;;; infinite list (defun lazy-rest (list) "returns the rest of the LIST, redeeming a promise if necessary" (check-type list list) (if (eql (first list) :promise) (rest (eval (rest list))) (rest list))) ;;; you can send this function a list produced by natural-numbers-from (lazy-rest '(7 :PROMISE NATURAL-NUMBERS-FROM 8)) ;;; exercises (all from book) ;;;19.1 ;;; 19.2 ;;; Chapter 20 ;;; functions with arbitrary numbers of arguments ;;; 20.1 here is the code you'll need (defpackage ch20) (in-package ch20) (shadow 'lisp:list) (defun list (&rest objects) "returns list of all its args" objects) ;;; test it (list 8 9 7) ;;; 20.2 ;;; make sure to shadow lisp:<= ;;; chapter 21 mapping functions ;;; ;;; mapcar applies a function to each of its arguments (mapcar #'cons '(a c e g) '((b) (d) (f) (h))) ;;; lambda functions ((lambda (x y) (+ x y)) 4 5) ;;; function using lambda and mapcar (defun make-lst (elt lst) "replaces each element of lst with a list containig elt and that element" (mapcar #'(lambda (x) (list elt x)) lst)) ;;; 21.5