From: David Kurlander
Subject: reverse in Common LISP
Date: 
Message-ID: <1992Feb13.163019.22769@cs.columbia.edu>
Certain non-destructive lisp operators are allowed to return their
list arguments (or tails of them) without copying them.  Is this true
of reverse?  For example, could a correct implementation return t for
the second of the following two expressions?

(setq a '(1))
(eq a (reverse a))

David
-- 
----------------------------------
David Kurlander				Department of Computer Science
···@cs.columbia.edu			Columbia University
From: Barry Margolin
Subject: Re: reverse in Common LISP
Date: 
Message-ID: <kpmu52INNdui@early-bird.think.com>
In article <······················@cs.columbia.edu> ···@cs.columbia.edu (David Kurlander) writes:
>Certain non-destructive lisp operators are allowed to return their
>list arguments (or tails of them) without copying them.  Is this true
>of reverse?

No.  REVERSE is documented as returning a new sequence containing the
elements of the argument sequence in reverse order.  Thus, (reverse seq) is
equivalent to (nreverse (copy-seq seq)).
-- 
Barry Margolin, Thinking Machines Corp.

······@think.com
{uunet,harvard}!think!barmar