From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: New version of todo-mode.el (announcement + user guide) Date: Wed, 12 Jun 2013 23:38:37 +0200 Message-ID: <874nd3dn6q.fsf@rosalinde.fritz.box> References: <87k3m2275u.fsf@rosalinde.fritz.box> <8761xmxfnx.fsf@bzg.ath.cx> <87txl6ghjq.fsf@rosalinde.fritz.box> <87a9myggr7.fsf@wanadoo.es> <87sj0p8z99.fsf@rosalinde.fritz.box> <87mwqwpk98.fsf@rosalinde.fritz.box> <854nd32mz4.fsf@inode.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371076928 20116 80.91.229.3 (12 Jun 2013 22:42:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Jun 2013 22:42:08 +0000 (UTC) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 13 00:42:08 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Umtjz-0002Tc-BL for ged-emacs-devel@m.gmane.org; Thu, 13 Jun 2013 00:42:07 +0200 Original-Received: from localhost ([::1]:54315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmszI-0006Zn-6K for ged-emacs-devel@m.gmane.org; Wed, 12 Jun 2013 17:53:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umssp-00089Q-TM for emacs-devel@gnu.org; Wed, 12 Jun 2013 17:47:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Umssj-0001qf-Dx for emacs-devel@gnu.org; Wed, 12 Jun 2013 17:47:11 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:56073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Umska-0006sB-SD for emacs-devel@gnu.org; Wed, 12 Jun 2013 17:38:41 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.24]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MXCId-1UsZlN0wVB-00WGEx for ; Wed, 12 Jun 2013 23:38:40 +0200 Original-Received: (qmail invoked by alias); 12 Jun 2013 21:38:39 -0000 Original-Received: from i59F55541.versanet.de (EHLO rosalinde.fritz.box) [89.245.85.65] by mail.gmx.net (mp024) with SMTP; 12 Jun 2013 23:38:39 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19CP+95CqFCK2uSvDQHd65gZ24AXokFApRLLzP/c9 +YbwdhhZcUDUyj In-Reply-To: <854nd32mz4.fsf@inode.at> (Wolfgang Jenkner's message of "Wed, 12 Jun 2013 20:30:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160391 Archived-At: On Wed, 12 Jun 2013 20:30:45 +0200 Wolfgang Jenkner 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