[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lists.texi

From: Richard Stallman
Subject: Re: lists.texi
Date: Sun, 19 Jun 2005 11:55:35 -0400

    Maybe I am trying to document a bug here.  Maybe it is better not to
    add these two sentences and instead make `ring-elements' do what the
    first sentence above, and its docstring, say it does.

I think so.

    !     (nconc lst (make-list (- (ring-length ring) (length lst)) nil))))

What's the purpose of this?  It seems only to reintroduce the same bug
that the delq fixes.

    (defun ring-elements (ring)
      "Return a list of the elements of RING in order, newest first."
      (let (lst)
        (dotimes (var (ring-length ring))
          (push (ring-ref ring var) lst))
        (nreverse lst)))

Isn't that quadratically slow?  And it doesn't fix the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]