[Top][All Lists]
[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
- EWMH package, please review., Jan D., 2003/10/12
- Re: EWMH package, please review., Kim F. Storm, 2003/10/12
- Re: EWMH package, please review., Miles Bader, 2003/10/12
- Re: EWMH package, please review., Jan D., 2003/10/13
- Re: EWMH package, please review., David Kastrup, 2003/10/13
- Re: EWMH package, please review., Thien-Thi Nguyen, 2003/10/13
- Re: EWMH package, please review., Jan D., 2003/10/18
- Re: EWMH package, please review., David Kastrup, 2003/10/18
- Re: EWMH package, please review.,
David Kastrup <=
- Re: EWMH package, please review., Jan D., 2003/10/27
Re: EWMH package, please review., Richard Stallman, 2003/10/13