[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why doesn't this work?
- To: info-mcl@ministry.cambridge.apple.com
- Subject: Why doesn't this work?
- From: ingles@engin.umich.edu (Ray Ingles)
- Date: 21 Sep 1993 20:42:10 GMT
- Distribution: world
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Michigan Engineering, Ann Arbor
I'm taking the "Intro to AI" class, and I'm using Mac Lisp 2.0. (I am
not sure of the specific version, but it was created 6/1/92.)
Now, this is a transcript of a Mac Lisp session:
----------begin cut 'n pasted text--------------
Welcome to Macintosh Common Lisp Version 2.0!
? (defun example1
(a b &optional (c 1 d) e &rest f
&key (g 1) ((:s k) 5))
(list a b c d e f g k))
EXAMPLE1
? (example1 'a 'b 'c 'e :g 10)
(A B C T E (:G 10) 10 5)
? (defun example2
(a b c d &optional e (f 1) (g 3 g-flag)
&rest h
&key (fun 'k)
((:start begin) 0))
(print (list a b c d e f g g-flag h fun begin)))
EXAMPLE2
? (example2 1 2 3 4 5 6 7 :fun 'y :start 9)
(1 2 3 4 5 6 7 T (:FUN Y :START 9) Y 9)
(1 2 3 4 5 6 7 T (:FUN Y :START 9) Y 9)
? (example2 1 2 3 4 5 6)
(NIL NIL 1 2 3 1 3 NIL 6 K 0)
(NIL NIL 1 2 3 1 3 NIL 6 K 0)
?
---------end transcript--------
Now, the second one is way off. The last answer should be:
(1 2 3 4 5 6 3 NIL NIL K 0)
(1 2 3 4 5 6 3 NIL NIL K 0)
...according to our professor, and that seems right to me too. EXAMPLE2
Works right the first time, and totally off the second. Is this the result
of a bug in Mac Lisp, or our understanding? (It works fine on an HP
workstation running Allegro Common Lisp...)
For what it's worth, I'm running this on a Classic II, System 7.1, 6 megs
RAM, etc. (It also failed on a powerbook, make unknown, in class today.)
Is there a known bug fix or workaround for this?
Sincerely,
Ray Ingles || The above opinions are probably
|| not those of the University of
ingles@engin.umich.edu || Michigan. Yet.