help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: ** Graded examples of lambda functions in emacs lisp, how to create


From: gnuist006
Subject: Re: ** Graded examples of lambda functions in emacs lisp, how to create hook variable? **
Date: 8 Oct 2002 07:21:26 -0700

David Kastrup <David.Kastrup@t-online.de> wrote in message 
news:<x5it0edz31.fsf@tupik.goethe.zz>...
> gnuist007@hotmail.com (gnuist) writes:
> 
> > In the same way, I ask for GRADED examples of use of lambda. I am sure many
> > of you can just cut and paste from your collection. Examples to illustrate
> > recursion, etc. And how will you do recursion with/without "LABEL"?
> 
> ((lambda (f n) (funcall f f n))
>  (lambda (f n) (if (zerop n) 1 (* n (funcall f f (1- n)))))
>  5)

I know that many people intended to be helpful. But,
this is the type of code I was looking for the one
that runs in emacs since that is the only interpreter 
I have running.

However, I would want some explanatory comments.

Is funcall a primitive function of emacs lisp in the
sense of the 5 primitive functions of JM (macarthy's) lisp?
Is it corresponding to the primitive "LABEL" that is
discussed in his papers?

On the other thread today you posted this one and it runs on
emacs. Can you give some explanatory comments/dissection?

((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)

I think that of all the post this was helpful since it starts
where my knowledge ends on this subject.


reply via email to

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