From: Antonio Leitao

Subject: Re: Ill formed cdr arg anomaly

Date: 1997-6-12 13:03

>>>>> "Charles" == Charles Earl <cs.uchicago.edu at earl> writes:
Charles> Just curious about the following result I obtained under ACL4.3 o n a Charles> sparcstation running solaris Charles> USER(22): (setq a '(b c)) Charles> (B C) Charles> USER(23): (setq d '(e f)) Charles> (E F) Charles> USER(24): (cdr a . d) Charles> (C) Charles> It seems to me that it should return an error, which is the case under Charles> CMUCL Charles> * (setq a '(b c)) Warning> Declaring A special. Charles> (B C) Charles> * (setq d '(e f)) Warning> Declaring D special. Charles> (E F) Charles> * a Charles> (B C) Charles> * (cdr a . d) Charles> Type-error in KERNEL::OBJECT-NOT-LIST-ERROR-HANDLER: D is not of type LIST Charles> MCL3.9, which returns Charles> Error value D is not of expected type LIST Charles> ACL3.0.2 returns an error Error> Argument D given to RPLACA or RPLACD should have been a cons in ACL> SC-DISPATCH Charles> And Harlequin FreeLisp gives Error> Non-list argument D for endp Charles> What's the right thing to do? Does it matter? Not only your examples show a flaw (IMHO) in Allegro but this flaw also occurs in many other (simpler) situations: USER(30): (+ 1 2 . 3) 3 USER(31): (* 2 . 4) 2 I searched the CommonLisp Hyperspec and there's nothing that forces a form to be a proper list, but there isn't nothing that suggest that it can be a non-proper list. António Leitão