From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Visher Newsgroups: gmane.emacs.help Subject: Re: Generic `tree-seq` function definition? Date: Fri, 6 Sep 2013 12:05:05 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1378483570 20612 80.91.229.3 (6 Sep 2013 16:06:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Sep 2013 16:06:10 +0000 (UTC) Cc: emacs To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 06 18:06:15 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1VHyY2-0005Kk-Hv for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 18:06:14 +0200 Original-Received: from localhost ([::1]:38768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHyY2-0000yN-2f for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 12:06:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHyXe-0000u2-68 for help-gnu-emacs@gnu.org; Fri, 06 Sep 2013 12:05:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHyXa-0006LQ-05 for help-gnu-emacs@gnu.org; Fri, 06 Sep 2013 12:05:50 -0400 Original-Received: from mail-ve0-x235.google.com ([2607:f8b0:400c:c01::235]:53173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHyXZ-0006LL-LD for help-gnu-emacs@gnu.org; Fri, 06 Sep 2013 12:05:45 -0400 Original-Received: by mail-ve0-f181.google.com with SMTP id oy12so1783326veb.12 for ; Fri, 06 Sep 2013 09:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=U2Y7E6OMOrPtNLcrB5djgenTr4JsBPIOFcEaEETRQsM=; b=T14I587ninex/2YjsSe7U6hIdZQHTUvJ8QpqwwQ/1l9zqFu95Im0eYjSWZjCahcqkO I9jGWAIwiXI93Fia16ohe+MAoYYiGygltryzflCbPFk2Li5q8Db8HLVLjIlwVP1IXx18 rqheIbM6q60yNQUofio35iTOKc250RTRnGLkpHJJcU7aCwLlE130rEUTTC4AOycGl+Jb vIOdT1Jjoa4ScRYXc4MPMktJWWJpt8rkJKszuSZ3SV8WKQSDGwAkjbj7zVAGTmlAmgUl 9gaEKcsNmG13pbVFCq0Rkfu8/Wh2F/pJvw2rZ8plAk1rmGjHnU7G7XiSm8F+Zb4DVHi4 TIWw== X-Received: by 10.52.23.113 with SMTP id l17mr2566102vdf.23.1378483545288; Fri, 06 Sep 2013 09:05:45 -0700 (PDT) Original-Received: by 10.221.54.129 with HTTP; Fri, 6 Sep 2013 09:05:05 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c01::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93294 Archived-At: On Fri, Sep 6, 2013 at 11:17 AM, Stefan Monnier wrote: > > (defun tree-seq (branch? children root) > > (cl-labels ((walk (node) > > (cons node > > (if (funcall branch? node) > > (cl-mapcan 'walk (cddr (funcall children > ^^^^^ > > This is the `walk' symbol. You want the `walk' function instead. > I.e. use #'walk Thank you! -- In Christ, Timmy V. http://blog.twonegatives.com/ http://five.sentenc.es/ -- Spend less time on mail