[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lists.texi
From: |
David Kastrup |
Subject: |
Re: lists.texi |
Date: |
Sun, 19 Jun 2005 08:37:51 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Luc Teirlinck <address@hidden> writes:
> Actually, if we have to do all of that to get the correct return
> value, we could quite as well use the following function, which does
> get the order correct:
>
> (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)))
Looks like O(n^2) complexity to me.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- lists.texi, Luc Teirlinck, 2005/06/18
- Re: lists.texi, Luc Teirlinck, 2005/06/18
- Re: lists.texi, Luc Teirlinck, 2005/06/18
- Re: lists.texi,
David Kastrup <=
- Re: lists.texi, Richard Stallman, 2005/06/19
- Re: lists.texi, Luc Teirlinck, 2005/06/19
- Re: lists.texi, Richard Stallman, 2005/06/20
- Re: lists.texi, Luc Teirlinck, 2005/06/20
- Re: lists.texi, David Kastrup, 2005/06/21
- Re: lists.texi, Richard M. Stallman, 2005/06/21
- Re: lists.texi, Thien-Thi Nguyen, 2005/06/21
- Re: lists.texi, Luc Teirlinck, 2005/06/21
- Re: lists.texi, Thien-Thi Nguyen, 2005/06/21
- Re: lists.texi, Luc Teirlinck, 2005/06/21