GNU bug report logs - #6583
23.2; cl loop macro with `and' clause

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Wed, 7 Jul 2010 23:34:03 UTC

Severity: normal

Tags: confirmed

Merged with 56416

Found in versions 23.2, 24.5, 25.0.94, 29.0.50

Full log


Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lawrence Mitchell <wence <at> gmx.li>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#6583: 23.2; cl loop macro with `and' clause
Date: Thu, 08 Jul 2010 09:28:35 +0100
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 <wence <at> gmx.li>





This bug report was last modified 3 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.