bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6583: 23.2; cl loop macro with `and' clause


From: Lawrence Mitchell
Subject: bug#6583: 23.2; cl loop macro with `and' clause
Date: Thu, 08 Jul 2010 09:28:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (usg-unix-v)

Kevin Ryde wrote:
[...]

> I struck this when making a loop over an alist where I thought to take
> apart the key and value with an `and' as they didn't need to be
> sequential,

>     (loop for elem in my-alist
>           for k = (car elem) and v = (cdr elem)
>           do
>           ...

Note the idiomatic way of writing this loop:

(loop for (k . v) in my-alist
      do ...)

Although this does not address the question of the bug.

-- 
Lawrence Mitchell <address@hidden>






reply via email to

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