From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Generic `tree-seq` function definition? Date: Fri, 06 Sep 2013 11:17:07 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378480818 20062 80.91.229.3 (6 Sep 2013 15:20:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Sep 2013 15:20:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 06 17:20:22 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 1VHxpa-0007Qe-Cj for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 17:20:18 +0200 Original-Received: from localhost ([::1]:38315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHxpZ-0002n8-VF for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Sep 2013 11:20:17 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 12 Injection-Info: mx05.eternal-september.org; posting-host="f22c1023fc80dd00347cd954e9d55754"; logging-data="22900"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zjXePE7eTDIEk4sEUsbux" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:6BRyvIDP5Z5S1gvLQZLyUyLWknY= sha1:GjDdoPTcmE/IRQYMxusZJTXwNSE= Original-Xref: usenet.stanford.edu gnu.emacs.help:201024 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:93293 Archived-At: > (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 Stefan