Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Buggy example in HS?

0 views
Skip to first unread message

Norbert_Paul

unread,
Apr 30, 2010, 7:48:44 AM4/30/10
to
In the HyperSpec I found in f_adjoin.htm:

(adjoin item list :key fn)
== (if (member (fn item) list :key fn) list (cons item list));.

Is that buggy? Shouldn't it be

(adjoin item list :key fn)
== (if (member (funcall fn item) list :key fn) list (cons item list));?


Norbert

Pascal Costanza

unread,
Apr 30, 2010, 8:55:44 AM4/30/10
to

Indeed. The mistake is actually explicitly mentioned in CLtL2, but
apparently the correction didn't make it into ANSI CL.


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/

0 new messages