[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cl-dolist, dolist, cl-return,
From: |
Emanuel Berg |
Subject: |
Re: cl-dolist, dolist, cl-return, |
Date: |
Wed, 08 Jul 2015 12:17:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
"Pascal J. Bourguignon" <pjb@informatimago.com>
writes:
> (loop for item in list until (some-condition-p
> item))
These loops are brilliant! Only there are so many,
which overlap... Perhaps one could draw a
"periodic table" of Lisp loops. I remember something
like that from the book "Land of Lisp", but I read
that at the library so I can't check.
Good book, anyway.
@book{land-of-lisp,
title = {Land of Lisp},
author = {Conrad Barski},
publisher = {No Starch},
year = 2010,
ISBN = 1593272812
}
In C there are what I remember only three loops (if
you don't count recursion, or gotos for that matter) -
the familiar for, while, and 'do while'. It is
possible to construct all (?) loops with these, but
I like the Lisp way more where it can be expressed in
syntax, not merely constructed in code.
The loop finally turned up like this:
(cl-loop for b in (erc-buffer-list)
when (neq b (current-buffer)) do ...
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: cl-dolist, dolist, cl-return,, (continued)
- Re: cl-dolist, dolist, cl-return,, Emanuel Berg, 2015/07/08
- Re: cl-dolist, dolist, cl-return,, Stefan Monnier, 2015/07/08
- Re: cl-dolist, dolist, cl-return,, Emanuel Berg, 2015/07/08
- Re: cl-dolist, dolist, cl-return,, John Mastro, 2015/07/08
- Re: cl-dolist, dolist, cl-return,, Emanuel Berg, 2015/07/09
- Message not available
- Re: cl-dolist, dolist, cl-return,, Barry Margolin, 2015/07/10
- Re: cl-dolist, dolist, cl-return,, Emanuel Berg, 2015/07/11
- Re: cl-dolist, dolist, cl-return,, Stefan Monnier, 2015/07/10
Re: cl-dolist, dolist, cl-return,, Emanuel Berg, 2015/07/08
Re: cl-dolist, dolist, cl-return,, Pascal J. Bourguignon, 2015/07/07
- Re: cl-dolist, dolist, cl-return,,
Emanuel Berg <=
- RE: cl-dolist, dolist, cl-return,, Drew Adams, 2015/07/08
- Re: cl-dolist, dolist, cl-return,, Emanuel Berg, 2015/07/08
- Message not available
- Re: cl-dolist, dolist, cl-return,, Pascal J. Bourguignon, 2015/07/08