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

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

Re: Lambda calculus and it relation to LISP


From: William Elliot
Subject: Re: Lambda calculus and it relation to LISP
Date: Mon, 7 Oct 2002 02:59:39 -0700

On 7 Oct 2002, David Kastrup wrote:
> address@hidden (Barb Knox) writes:
> > For example, here is a recursive factorial function in lambda calculus in
> > Lispish syntax (assuming apprioriate definitions for 'if', '<', '*', '-',
> > and '1').  It takes one argument (which gets bound to 'n') and returns its
> > factorial.
> >
> >     ((lambda (f) ((lambda (Y) (f (Y Y))) (lambda (Y) (f (Y Y)))))
> >      (lambda (ff n) (if (< n 1) 1 (* n (ff (- n 1))))) )
>
> Also wrong.  This is "Lispish Syntax", actually Scheme.  So we can
> check it out:
>
> guile> ((lambda (f) ((lambda (Y) (f (Y Y))) (lambda (Y) (f (Y Y)))))
    (lambda (ff n) (if (< n 1) 1 (* n (ff (- n 1))))) )

What's lambda calculus expressions for -, <, if, = ?



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


reply via email to

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