[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lists.texi
From: |
Thien-Thi Nguyen |
Subject: |
Re: lists.texi |
Date: |
21 Jun 2005 12:35:39 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Luc Teirlinck <address@hidden> writes:
> (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)))
an index of -1 returns the "oldest" element.
so you could just `(ring-ref ring -1)' until the
ring is exhausted, obviating both `nreverse' and
`var' reference, while keeping the abstraction.
thi
- 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, 2005/06/19
- 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 <=
- 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
- Re: lists.texi, Luc Teirlinck, 2005/06/21
- Re: lists.texi, Thien-Thi Nguyen, 2005/06/21
- Re: lists.texi, Juri Linkov, 2005/06/22
- Re: lists.texi, Eli Zaretskii, 2005/06/22
- Re: lists.texi, Luc Teirlinck, 2005/06/22
- Re: lists.texi, Luc Teirlinck, 2005/06/22
- Re: lists.texi, Richard M. Stallman, 2005/06/23