emacs-devel
[Top][All Lists]
Advanced

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

Re: New version of todo-mode.el (announcement + user guide)


From: Stephen Berman
Subject: Re: New version of todo-mode.el (announcement + user guide)
Date: Wed, 12 Jun 2013 23:38:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

On Wed, 12 Jun 2013 20:30:45 +0200 Wolfgang Jenkner <address@hidden> wrote:

> On Tue, Jun 11 2013, Stephen Berman wrote:
>
>> - The code makes use of a powerset function, which Emacs doesn't have.
>>   I tried but couldn't come up with my own algorithm but found a
>>   recursive Common Lisp implementation and an iterative one in C
>
> The straightforward recursive implementation can be rewritten as an
> iterative one by conceptually doing left- instead of right-folding.
>
> (defun my-powerset (list)
>   "Return the powerset of LIST."
>   (let ((powerset (list nil)))
>     (dolist (elt list (mapcar 'reverse powerset))
>       (nconc powerset (mapcar (apply-partially 'cons elt) powerset)))))

This is nice.  Maybe you could get it added to Emacs and then I could
just invoke it.  Or if the mainainers don't want a powerset function,
would you be willing to contribute it to my package, if the ones I used
aren't usable for copyright reasons?

Steve Berman



reply via email to

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