diff options
author | Kevin Ryde <user42@zip.com.au> | 2011-07-14 02:14:35 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-07-14 02:14:35 +0200 |
commit | c0a8ae956f71631400fcb52669f4f923ed4151af (patch) | |
tree | d96835f2855c16aa9292866325488159cf4ca758 /doc/misc | |
parent | f2027cdf5adf8bcb620a31addf5a5851e542affd (diff) | |
download | emacs-c0a8ae956f71631400fcb52669f4f923ed4151af.tar.gz |
* cl.texi (For Clauses): Add destructuring example processing an
alist.
Diffstat (limited to 'doc/misc')
-rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/misc/cl.texi | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 3738301ceea..9687f474286 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2010-07-10 Kevin Ryde <user42@zip.com.au> + + * cl.texi (For Clauses): Add destructuring example processing an + alist (bug#6596). + 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> * org.texi (Special agenda views): Fix double quoting (bug#3509). diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index ab54b99138a..3f3d616e343 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -2586,7 +2586,14 @@ the trailing values are ignored, and if there are more variables than values the trailing variables get the value @code{nil}. If @code{nil} is used as a variable name, the corresponding values are ignored. Destructuring may be nested, and dotted -lists of variables like @code{(x . y)} are allowed. +lists of variables like @code{(x . y)} are allowed, so for example +to process an alist + +@example +(loop for (key . value) in '((a . 1) (b . 2)) + collect value) + @result{} (1 2) +@end example @node Iteration Clauses, Accumulation Clauses, For Clauses, Loop Facility @subsection Iteration Clauses |