emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EWMH package, please review.


From: David Kastrup
Subject: Re: EWMH package, please review.
Date: 18 Oct 2003 20:15:05 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

David Kastrup <address@hidden> writes:

> "Jan D." <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]