[plt-scheme] Understanding lambda
On Fri, Feb 13, 2009 at 3:32 PM, aditya shukla
<adityashukla1983 at gmail.com> wrote:
> Thanks for the help guys , so now i know that in (define f (lambda(x) (+(*
> 3 x) 5))) value of f is a function returned by the lambda expressions.so
> when i do ( f 1) or anything as in (f 55) then what are 1 or 55 in this
> expression , constants or functions?
I think whether or not 1 and 55 are constants is kind of beside the
point... one could consider (lambda (x) (+ (* 3 x) 5)) a constant,
too. (I won't go into why, I think at this point it would just be
confusing.) The important thing is that they are all expressions,
they all produce values, but 1 and 55 produce numbers and the lambda
expression produces a function. The important distinction between
them is the kind of data they produce.
--
Carl Eastlund