emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] sequence manipulation functions


From: Nicolas Petton
Subject: Re: [PATCH] sequence manipulation functions
Date: Mon, 24 Nov 2014 19:01:35 +0100
User-agent: mu4e 0.9.9.6pre3; emacs 24.3.1

There was an error in my previous patch.

Attachment: seq.diff
Description: Text Data

Nico


Nicolas Petton <address@hidden> writes:

> Hi,
>
> Here's a new version of the patch.
>
>
> I fixed all the byte-compile warnings, added an alias for `reverse', and
> improved `seq-doseq'.
>
> Stefan, can you have another look at seq-doseq?
>
> Cheers,
> Nico
>
> Stefan Monnier <address@hidden> writes:
>
>>>>> 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

-- 
Nicolas Petton
http://nicolas-petton.fr

reply via email to

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