MAX is predefined in Common Lisp. You are redefining a predefined operator. This seems to send CMUCL in the GC frenzy. This is a misdemeanor on CMUCL part.
Anyway, since MAX is predefined, you don't need to redefine it. Note (max 1 2 7 -9 2) ==> 7 Cheers On Wednesday, Jan 29, 2003, at 21:03 America/New_York, Wayne O. Cochran wrote: > > I had a lab full of students today to whom > I am introducing Common Lisp. Everything started out > well. I taught this class last year and never > had a problem (used version 18c then, using 18d now). > I introduced defun, and proceeded to show them > a simple example and then... > > $ lisp > CMU Common Lisp 18d, running on cs01.vancouver.wsu.edu > Send questions to [EMAIL PROTECTED] and bug reports to > [EMAIL PROTECTED] > Loaded subsystems: > �� �Python 1.0, target Intel x86 > �� �CLOS based on PCL version: �September 16 92 PCL (f) > * (defun max (a b) (if (> a b) a b)) > > MAX > * (max 3 5) > [GC threshold exceeded with 2,000,360 bytes in use. �Commencing GC.] > [GC completed with 1,927,536 bytes retained and 72,824 bytes freed.] > [GC will next occur when at least 3,927,536 bytes are in use.] > [GC threshold exceeded with 3,935,024 bytes in use. �Commencing GC.] > [GC completed with 3,942,880 bytes retained and -7,856 bytes freed.] > [GC will next occur when at least 5,942,880 bytes are in use.] > [GC threshold exceeded with 5,947,736 bytes in use. �Commencing GC.] > [GC completed with 5,957,176 bytes retained and -9,440 bytes freed.] > [GC will next occur when at least 7,957,176 bytes are in use.] > [GC threshold exceeded with 7,961,480 bytes in use. �Commencing GC.] > <etc> > > Uh... how could max throw the gc into a frenzy? > > It did actually work in a few instances, but then things > quickly went down hill. Any theories? > > --w > > Wayne O. Cochran > Assistant Professor of Computer Science > Washington State University Vancouver > [EMAIL PROTECTED] > > ------------------------------------------------- > This mail sent through IMP: http://horde.org/imp/ > -- Marco Antoniotti NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A.
