unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: ttn@glug.org, storm@cua.dk, emacs-devel@gnu.org
Subject: Re: EWMH package, please review.
Date: 18 Oct 2003 20:15:05 +0200	[thread overview]
Message-ID: <x5brse8lau.fsf@lola.goethe.zz> (raw)
In-Reply-To: <x5fzhq8lr1.fsf@lola.goethe.zz>

David Kastrup <dak@gnu.org> writes:

> "Jan D." <jan.h.d@swipnet.se> 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

  reply	other threads:[~2003-10-18 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-12 16:53 EWMH package, please review Jan D.
2003-10-12 22:17 ` Kim F. Storm
2003-10-12 22:54   ` Miles Bader
2003-10-13  4:34     ` Jan D.
2003-10-13  4:30   ` Jan D.
2003-10-13  7:54     ` David Kastrup
2003-10-13  8:43     ` Thien-Thi Nguyen
2003-10-18 17:47       ` Jan D.
2003-10-18 18:05         ` David Kastrup
2003-10-18 18:15           ` David Kastrup [this message]
2003-10-27  5:56           ` Jan D.
2003-10-13 18:21   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5brse8lau.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).