| Author |
What is the difference between these two expressions?
|
|
|
| Hi,
Why does the first function give a and the second gives (a)?
> (let ((f (lambda (x) x))) (f 'a))
a
> (let ((f (lambda x x))) (f 'a))
(a)
>
| |
| Nils M Holm 2007-02-09, 7:10 pm |
| Griff <grettke@gmail.com> wrote:
> Hi,
>
> Why does the first function give a and the second gives (a)?
>
> a
> (a)
What do the following expressions reduce to?
((lambda (x) x))
((lambda (x) x) 'a 'b)
And these?
((lambda x x))
((lambda x x) 'a 'b)
--
Nils M Holm <n m h @ t 3 x . o r g> -- http://t3x.org/nmh/
| |
| Jens Axel Søgaard 2007-02-09, 7:10 pm |
| Griff skrev:
> Hi,
>
> Why does the first function give a and the second gives (a)?
>
> a
> (a)
The syntax of a lambda expression is (lambda <formals> <body> ).
See the explanation of <formals> here:
<http://www.schemers.org/Documents/S...tml#%_sec_4.1.4>
--
Jens Axel Søgaard
|
|
|
|