Subject: Re: association lists ...
From: Erik Naggum <erik@naggum.no>
Date: 1997/06/22
Newsgroups: comp.lang.lisp
Message-ID: <3075969771339621@naggum.no>


* Juan Jose Flores Romero
| I found a really bad *feature* in Allegro CL 4.2 for SPARCS.  If an
| association list has nil as one of the keys, you get weird behavior.

your example consistently yields the same results in _all_ the Lisp
environments I have access to.

(defun sublis-test (test-arg)
  (let ((alist '((a . 1) (b . 2) (nil . 3) (d . 4) (e . 5))))
    (sublis alist test-arg)))

(sublis-test '(= a b))		=> (= 1 2 . 3)
(sublis-test ())		=> 3
(sublis-test '(()))		=> (3 . 3)

I think there lies wisdom in this rewrite of the last example:

(sublis-test (cons nil nil))	=> (3 . 3)

#\Erik
-- 
if we work harder, will obsolescence be farther ahead or closer?