From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: EWMH package, please review. Date: 18 Oct 2003 20:15:05 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <0864E46B-FD36-11D7-8B0B-00039363E640@swipnet.se> <3F917CB2.9000001@swipnet.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066501055 3975 80.91.224.253 (18 Oct 2003 18:17:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2003 18:17:35 +0000 (UTC) Cc: ttn@glug.org, storm@cua.dk, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Oct 18 20:17:32 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAvds-0000g7-00 for ; Sat, 18 Oct 2003 20:17:32 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAvds-0000jR-00 for ; Sat, 18 Oct 2003 20:17:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAvcW-000738-VJ for emacs-devel@quimby.gnus.org; Sat, 18 Oct 2003 14:16:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AAvcJ-00070F-KJ for emacs-devel@gnu.org; Sat, 18 Oct 2003 14:15:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AAvbn-0006mR-Cx for emacs-devel@gnu.org; Sat, 18 Oct 2003 14:15:54 -0400 Original-Received: from [217.80.157.149] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AAvbm-0006jG-D3 for emacs-devel@gnu.org; Sat, 18 Oct 2003 14:15:22 -0400 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h9IIFBxc012638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Oct 2003 20:15:11 +0200 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h9IIF6UI012634; Sat, 18 Oct 2003 20:15:06 +0200 Original-To: "Jan D." In-Reply-To: Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17235 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17235 David Kastrup writes: > "Jan D." writes: > > > It was functional programming that we used Lisp for (never > > reassign variables, among other things), so it kind of stuck. And > > there was questions asked at the time :-). > > You mean things like doing recursion without having a lexical > possibility to let a lambda function refer to itself? > > Emacs-Lisp: > > ((lambda (f g n) (funcall g (funcall f f g) n)) > (lambda (f g) `(lambda (n) (,g (funcall ,f ,f ,g) n))) > (lambda (f n) (if (zerop n) 1 (* n (funcall f (1- n))))) > 5) > > Common Lisp: delete the ` and , Uh, actually you have to add a funcall in the second line, too, in order to get this through Common Lisp: ((lambda (f g n) (funcall g (funcall f f g) n)) (lambda (f g) (lambda (n) (funcall g (funcall f f g) n))) (lambda (f n) (if (zerop n) 1 (* n (funcall f (1- n))))) 5) -- David Kastrup, Kriemhildstr. 15, 44793 Bochum