[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] sequence manipulation functions
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] sequence manipulation functions |
Date: |
Fri, 21 Nov 2014 09:44:10 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>>> The macro could use to "dolist" if the sequence is a list.
>> But you'd then duplicate the code of the body, which could be
>> problematic, especially with nested seq-doseq loops.
> Oh, right! Another way would be to use a function, but I tried to avoid
> that. Do you have a better idea in mind?
You can change your `i' to be either an integer (for arrays) or a cons
cell (for lists). That requires an extra "is it a list?" test at each
iteration of the loop (to know how to extract the element and to
"increment" i), but I think it's the best we can do.
Stefan
- RE: [PATCH] sequence manipulation functions, (continued)
- RE: [PATCH] sequence manipulation functions, Drew Adams, 2014/11/16
- Re: [PATCH] sequence manipulation functions, Stefan Monnier, 2014/11/16
- Re: [PATCH] sequence manipulation functions, Richard Stallman, 2014/11/16
- Re: [PATCH] sequence manipulation functions, Nicolas Petton, 2014/11/17
- Re: [PATCH] sequence manipulation functions, Stefan Monnier, 2014/11/17
- Re: [PATCH] sequence manipulation functions, Damien Cassou, 2014/11/16
- Re: [PATCH] sequence manipulation functions, Stefan Monnier, 2014/11/20
- Re: [PATCH] sequence manipulation functions, Nicolas Petton, 2014/11/21
- Re: [PATCH] sequence manipulation functions, Stefan Monnier, 2014/11/21
- Re: [PATCH] sequence manipulation functions, Nicolas Petton, 2014/11/21
- Re: [PATCH] sequence manipulation functions,
Stefan Monnier <=
- Re: [PATCH] sequence manipulation functions, Nicolas Petton, 2014/11/24
- Re: [PATCH] sequence manipulation functions, Nicolas Petton, 2014/11/24
RE: sequence manipulation functions, Drew Adams, 2014/11/05
Re: sequence manipulation functions, Damien Cassou, 2014/11/05
RE: sequence manipulation functions, Drew Adams, 2014/11/05
Re: sequence manipulation functions, Nicolas Petton, 2014/11/05
Re: sequence manipulation functions, Tom Tromey, 2014/11/05
RE: sequence manipulation functions, Drew Adams, 2014/11/05